Lewdness is a generic term for any crime involving sex or exposure to the public. It can involve anything from exposing themselves, to prostitution, to sex with a minor. In order to constitute lewd conduct, generally there must be some intentional touching with the intent to sexually arouse. The touching need not be of someone else; touching oneself can qualify if done in public or if done in front of someone else who does not or cannot consent. Depending on which lewd crime, consent would not be a defense, ie. touching of a child or with two consenting adults if it occurs in public. Accidental touching would not qualify as lewd conduct.
In addition, the crime of soliciting lewd conduct, also known as prostitution or solicitation, need not have any touching at all, merely the request for that touching; that would fall under the umbrella of a lewd conduct crime. Many of the lewd conduct crimes in most states carry sexual offender registration requirements if convicted. This includes misdemeanors and will follow a defendant into a new state if they too have some kind of sex offender registration. It is of utmost importance to consult an attorney on any lewd conduct crime if charged or if moving to a new state to find out their registration requirements. You can be charged with failing to register as a crime in and of itself in your new state.
Elements, crimes and defenses vary from state to state and within the federal system. If you or someone you know is charged with any crime, as always, you should consult a local attorney, licensed to practice in your jurisdiction and preferably one practicing only criminal law. You can always look for your local criminal attorney at www.crimelawyers.org.