They miss, and they miss a lot. Firefights in Star Trek look mostly like firefights everywhere else - beams and bolts flying through the air, and every now and then someone gets hit.
One interesting aspect is that TNG-era phasers used by protagonists don't even look like practical weapons. I read somewhere that this was intentional design decision - Starfleet was supposed to be about peace and exploration, so they didn't want the protagonists carrying something recognizable as a gun. Star Trek back-tracked a bit from that later on, with introduction of phaser rifles that look not unlike something you could really see on a battlefield of the future. But back to the TNG phasers - because they're shaped more like a flat flashlight than a gun, they really must be tough to aim. I mean, try taking a laser pointer and hitting something a couple meters away from you with the first click of the button. It's hard. In my headcanon, phasers must run some sophisticated auto-targeting systems - otherwise, the feats of accuracy seen on the screen would be impossible.
Hand-held Phasers were also so small to show the power of the technology of the 24th century. Gene Roddenberry insisted indeed that they should not look like a pistol.
Source: Star Trek Design, by Judith & Garfield Reeves-Stevens
I have always explained it away in my head that the hand held phasers have some kind of feedback loop you learn while practicing. I.e. they have some kind of guiding or balancing mechanism, but it's not automatic, which is why you have all these training sessions on holodeck with Riker or whomever.
By the way, this is also what I love about a lot of Star Trek tech. Humans are mostly in the loop. (I am sure it's just a product of the times it was created, but I love it.) Reports are brought on PADDs walking to the captain, not emailing the captain. The computer is explicitly instructed to scan for people, it's not keeping tabs of everyone at all times. If you lose your badge, your are generally not tracked anymore. (No implants.) The badge is not always in recording or transmission mode. Sickbay does not have CCTV system always on. And so one. It seems like a culture which long ago decided on a trade-off between surveillance and privacy, and it's not the same we choosing right now.
But if I keep thinking in-universe style, the Star Trek / Federation culture on surveillance could have come from some hard won failures earlier on.
They miss, and they miss a lot. Firefights in Star Trek look mostly like firefights everywhere else - beams and bolts flying through the air, and every now and then someone gets hit.
One interesting aspect is that TNG-era phasers used by protagonists don't even look like practical weapons. I read somewhere that this was intentional design decision - Starfleet was supposed to be about peace and exploration, so they didn't want the protagonists carrying something recognizable as a gun. Star Trek back-tracked a bit from that later on, with introduction of phaser rifles that look not unlike something you could really see on a battlefield of the future. But back to the TNG phasers - because they're shaped more like a flat flashlight than a gun, they really must be tough to aim. I mean, try taking a laser pointer and hitting something a couple meters away from you with the first click of the button. It's hard. In my headcanon, phasers must run some sophisticated auto-targeting systems - otherwise, the feats of accuracy seen on the screen would be impossible.