A lewd act under law is the intentionally touching of someone's genitals or touching someone else for sexual arousal.
You can also get charged with a lewd act for arousing yourself in public by touching your own genitals in public where people can see.
Even if you were to put your hand down your pants in public and start masturbating in public such as at a park or anywhere else even in your front yard where people could see you then you could be charged with a lewd act.
A lewd act is any unlawful doing committed by an individual with the purpose of arousing sexual interest of himself or herself, or the person towards which the lewd act is directed.
Below is the the law about Lewd Acts.
Lewd act .— The term “lewd act” means— (A) any sexual contact with a child; (B) intentionally exposing one’s genitalia, anus, buttocks, or female areola or nipple to a child by any means, including via any communication technology, with an intent to abuse, humiliate, or degrade any person, or to arouse or gratify the sexual desire of any person.
(C) intentionally communicating indecent language to a child by any means, including via any communication technology, with an intent to abuse, humiliate, or degrade any person, or to arouse or gratify the sexual desire of any person.
Or (D) any indecent conduct, intentionally done with or in the presence of a child, including via any communication technology, that amounts to a form of immorality relating to sexual impurity which is grossly vulgar, obscene, and repugnant to common propriety, and tends to excite sexual desire or deprave morals with respect to sexual relations.
Someone convicted of public lewdness can be subjected to any or all of the following penalties: Incarceration. Sentences may involve 12 months or less in the county jail.
The judge may require that the entire sentence be served in jail.
Lewd act on a child can get you prison time and may get you 10 to 25 years in prison depending on what happened with the lewd act the person committed.