Firearms are widely varied and have many advantages and disadvantages, depending on circumstance. I’ll cover the basic types of firearms and their best uses, the rest I leave to you.
Handguns whether semiautomatic or revolver are best at short ranges and in tight spaces. A semiautomatic pistol generally holds more ammunition and fires faster than a revolver. Some revolvers have the advantage of being able to fire more than kind of ammunition however. A lot of people prefer an automatic, but you also need to consider maintenance in which case many revolvers have less moving parts and are very durable. Accuracy is not generally a factor when discussing revolver vs automatic, they vary depending on brand and caliber. Pistols are easy to carry and are a good general purpose firearm for any situation. That is why they are issued to police and soldiers the world over.
Rifles are generally best at long range in open spaces. They are designed to take down a target at extreme range, before the target is aware of your presence. A good choice for a sniper or sentry. There are many different kinds of rifle, from bolt action hunting rifles to assault rifles and they are all designed for the same thing. Generally speaking, bolt action rifles hold less ammo but fire larger caliber rounds, whereas assault rifles hold far more smaller caliber ammunition and fire more rapidly. Assault rifles are designed to maim an enemy, hunting rifles are designed to kill in a single shot.
Shotguns are best at very short ranges and almost any space. They make a good weapon for clearing urban areas and stopping many targets at once. They generally do not hold a lot of ammunition, but they can stop nearly anything with a single close range blast. Yes, a shotgun can and will behead someone. This makes them good against zombies, but only at short range. They can be modified for longer ranges and rapid fire, but only by a professional. Best used to provide cover while scavenging. Slow to fire, low ammunition capacity.
Short of military grade hardware, these are the kinds of firearms you need to know about. They are the most common, and will be the easiest to scavenge. I could also discuss military grade hardware like machine guns and grenade launchers, but the likelihood of locating them would be remote after an apocalypse. Stick to what you need, not what sounds cool.
Good luck fellow survivor!