All too often, people presume that when they are detained by police and then released that any potential case against them is immediately over, or at the very least not something to worry about. But is this the case?
Generally when the police detain you they are seeking information for the construction of a case, and the fact that they do not take you to jail or even take you to the police station may have no bearing on the case they have against you. All too often they will conduct "catch and release" operations on persons they are building a case against or preparing to charge, hoping they will find illegal weapons or drugs on the person. These searches are totally legal provided that the police have a reasonable suspicion that they will find something specific that they are looking for - a similar standard to what is required for a warrant or other legal search.
So what should you do if you're detained and then released? You should consider it a warning - the police have a reason to suspect you, and should further evidence come to light, they will charge you and may arrest you for much more than a brief moment. Once you are released, you should speak to a lawyer and explain to him any reason - no matter how innocent - that the police might have for arresting you. Additionally, you should discuss the detention with your lawyer, especially those parts pertaining to how you were seized and any searches the police conducted during the arrest. These may be vital to understanding what the police were looking for, or forming a defense against your chance.
The one thing you shouldn't do is presume that you "got away" with whatever the police might be interested in and that your case is over. To do so is not only dangerous, it will help the police to build a case against you and to gather evidence. Instead, you should be proactive - demand to know why you were detained, and what pending charges they are trying to prove. They are counting on you to do nothing, so nothing is the one thing you must not do.