system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Trek] How do phasers work?

Phasers are unique because they're a kind of do-everything weapon. On low settings in can render someone unconscious, or knock them over, I've even seen crewmen using them in art work on stretched-canvas. On high settings, I've heard them talk about how supposedly they can take out a small building, or a neighborhood block if you overload them. The only time I've *seen* a hand phaser destroy anything that big was the TNG episode Ensigns of Command (se3 ep2), wherein Data destroys an aqueduct with his Type II phaser. 

Another thing they do is they seem to be able to target objects very specifically. Such as how they can vaporize a person without causing an explosion, or damaging any surroundings. The aqueduct I mentioned earlier is also an example of this btw. When Data fires, the energy seems to follow the aqueduct all the way to the horizon without damaging anything else. So could an unscrupulous crewman for example, program his phaser to shoot the clothes off a woman to see her naked?

What kind of energy does a phaser shoot that can do all of this stuff from one hand-held device?
gpt
They're not energy weapons, they're particle weapons.  A phaser fires a concentrated stream of nadion particles.

They have a settable power level which allows for such a large degree of utility.  Starfleet favors them over other types of weapons (including projectile weapons) due to this versatility.

As for why vaporizing things doesn't mess up the area around them, phaser power settings aren't just for intensity, they also adjust things like the wavelength of the beam, which allows for vaporization of materials without affecting the surrounding stuff.  This is achieved much like a disruptor, simply releasing molecular bonds with a minimal amount of waste energy (some is redirected into the disintegration reaction).

As for your "clothing removal" setting, no.  The settings aren't that precise.  The settings that would disintegrate clothing would likely affect skin in the same way.