Everyone has offered good advice. Now I’ll speak in generalizations, to give you an idea of how most guns generally operate in regards to safeties. There are lots of exceptions, of course, which you’d have to learn on each gun.
Automatic pistols - which is to say, non-revolvers, generally have a manual safety on the upper left portion of the grip, or just above that, on the slide. If you are right handed, the safety should generally be above your right thumb while you’re gripping. Generally down is fire and up is safe. I can’t even recall offhand a firearm in which this is different, and I’ve fired a decent few handguns.
The aforementioned Beretta 92 is extremely common. Someone claimed in this thread that safe is down, up is fire, but I don’t think that’s true. At least, not in the 2 beretta models I’ve shot… something like that would stick out in my mind as unusual. Although, I suppose, if you’re in a situation where you have an unfamiliar gun and need to use it quickly, as long as you know where the manual safety is, it’s easy to attempt to fire it in either position quickly.
If the safety is labelled, generally red indicates fire, white indicates safe.
It’s somewhat common for automatic handguns not to have a manual safety - they have safeties which prevent accidental discharges, but not in the form of a thumb switch. Some guns (1911, springfield XD) have a grip safety which requires you to have your hand firmly on the gun’s grip when you fire.
Rifles and shotguns have a lot more variations in where the safety, or, in military rifles, a selector, is placed. I’m not familiar with hunting rifles and shotguns. A common safety that I know if referred to, I believe, as a “crossbolt” safety. It is a button either immediately behind the trigger or immediately in front of the trigger on the trigger guard or bottom of the receiver of the rifle or shotgun. You push it in on one side of the firearm, and it pops out on the other - to reverse, you push it in on the opposite side, and it pops out on the original side. On these mechanisms, generally, the right position is fire, and the left position is safe. Often the side of the button (when it is extended from the side of the firearm) will be colored red to indicate that it’s set to fire.
On military firearms, it’s more common to have a selector which determines the firing mode (full auto, semi auto, safe, for example). This is generally found near a right handed shooter’s left thumb - and this will generally be labelled with letters, or pictures indicating which position corresponds to which firing mode.
The AK-47 and variants are fairly unusual in that the selector mechanism is also a dust cover. It sits on the right side of the receiver, as a big switch. The top position being safe, middle being full auto, and bottom being semi-auto.