As you learn about house wiring, you will find that reverse connections in a household AC system can be a real problem.
The root of it is this: the electrical distribution system for houses provides power from the pole-mounted transformer sort of this way: two Hot lines come from the opposite ends of a transformer secondary winding, and the Neutral line comes from a center tap of the winding. There is 120 VAC from Neutral to each Hot, but 240 VAC from one hot to the other. The extra feature you need to know is that, at the transformer, the Neutral line is connected to a true Ground (by bare copper cable to a rod pounded into the soil). At your house breaker panel, the panel has two Hot bus bars, a Neutral bus bar (these three connected to the incoming lines), and a Ground bus bar. The latter is connected by another bare copper wire to a good ground in the house nearby, VERY often the water supply line coming into the home that is a metal line buried in the ground. And also at this box, the Neutral bus is again connected to that Ground wire. So this establishes what is called a "Grounded Neutral" power supply and bus system. The Neutral line is connected to a true earth Ground at the panel and the transformer, thus establishing for the entire AC system a zero voltage reference point. So this AC system is NOT floating.
Note that, within the home wiring system, cables will have three wires per circuit - Hot, Neutral and Ground, the last usually being simply bare. The Ground is there for safety features, and normally is connected to surfaces that might be exposed and accessible from the outside. Under normal circumstances it should be carrying NO current at all. But if abnormal conditions arise that allow current to leak out to exterior surfaces, that current will be carried to true earth Ground at the breaker panel along a conductor with no other function, so it should not be anywhere near overloaded and should be able to get that current to Ground without developing any significant voltage. In cases of a malfunction that creates a large current draw to Ground, such as a short in the device, the current may be large enough to trip the breaker in the Hot supply line, thus shutting off the circuit.
In any device the design should ensure that all live circuit components, from Hot to Neutral lines, are isolated from the device case. Only the Ground line should be connected to the case that may be exposed to people. But there are some poorly-built items (usually for very small current draws) that have parts of the interior chassis connected to Neutral. If these also are properly connected to Ground that's not usually a problem. BUT if, for some reason, the power supply is miswired (say, reversed wires in the wall outlet), this makes the interior chassis parts Hot instead of Neutral. But they are also Grounded, so there's a short and the breaker for the circuit will blow immediately.
The worst-case scenario can come about in older devices built with no Ground wire in their supply cord, and hence no grounded interior components, but with the Neutral wire somewhere connected to an interior chassis frame. In this case, if the cord is plugged into the wall the wrong way OR the wall socket is wrong, that interior chassis could become Hot instead of Neutral. As long as a person can't reach the interior chassis AND as long as this device is not connected to any other electrical device, we're safe. But there is a potential hazard, for example, if the outer shell of the device is cracked and interior components are exposed. These situations don't occur often but can, and that's why reversed polarity on AC systems is still considered a problem.