Criminal differs from civil law in that criminal law is action taken by the state against an individual or business for breaking a law, whereas civil law is between individuals or businesses.
The term for this is committing a crime, which is a prohibited act that violates a law set forth in either federal, state, or local statutes.
Crimes can be either misdemeanors or felonies. You have the option of choosing to represent yourself or hiring an attorney to defend you on either case type. Depending on the nature of the alleged crime, you may choose to waive your right to counsel. For traffic violations, you can sometimes get a summary proceeding in which you visit with a local judge and he resolves it with a summary judgment. However, for felony cases, you will want to hire an attorney to represent you.
People often ask if they have the right to refuse a search. There are personal searches, vehicle searches, and home searches.
The officer, given probable cause, can search your car when he/she wants. The law doesn't view a vehicle as private as a home, so it is more lenient to officers searching vehicles.
In your home, you are generally safe. They need your consent, a warrant, or "exigent" circumstances to enter your home. Exigent involves the nature of the offense, the evidence of probable cause and the likelihood of you getting away if he/she doesn't act soon.
Personally, they can search you given any of the following: If his safety is in question, if they arrest you, if they see something illegal you have on you, if you consent to being searched.
When asking you questions, if you feel like you are a suspect in a crime or could be later, you should speak with a lawyer before answering any of their questions. I have heard officers will use techniques like trying to force you to answer questions or the opposite approach of being overly friendly to get information. Keep in mind they are there to protect. If you did something wrong, they are there to find out it was you, and if you didn't do anything wrong, they are there to protect you. Just ask Kobe Bryant.
In most cases, you want to be respectful of the officer, but you also want to let them know that you understand the law and you will protect your rights.