Fixed barrel guns tend to be the most accurate. Guns where the barrel moves, but does not move in relation to the sights are also very accurate.
Accuracy is consistency. The ability of the gun, ammo, & shooter to put the bullet in precisely the same place, each and every time. When this happens (to the greatest extent practical) we say its "accurate".
As already mentioned, there are a lot of factors involved. Leaving aside the skill of the shooter, there are two broad categories of physical features that affect accuracy.
Those that have an effect on the mechanical accuracy of the handgun, such as barrel quality, ammo quality, fixed vs moving barrel, revolver vs "solid" barrel, etc.
Then there are those features that have an effect on how well the shooter can use the mechanical accuracy of the handgun. Sights, trigger, grip size, etc.
Some people will talk about the "inherent accuracy" of the cartridge (particularly with rifles). When you are looking at large groups of arms, there is something to that. When you are looking at a specific gun, its basically meaningless.
The most accurate handguns I know of are single shots. Bolt action, or break action. I've got a 9mm Luger handgun that will (and has) outshot (group size) every 9mm semiauto I've ever seen, or heard of. Its a Contender.