Just as the name implies, transformers transform electricity. You can find them everywhere from your mobile's charger brick to mounted beneath high tension wires. There are travel transformers, industrial transformers and a host of other transformers. The one thing they all have in common is that they convert alternating current, the kind used in the mains, from the voltage at which it's supplied to the voltage you can use.
How Transformers Work
The basic principle behind transformers is simple: fluctuating electric currents create a magnetic field, and equally importantly, that same magnetic field can create electric current. It only works on mains electricity because it requires alternating current, not the direct current used in batteries. The way it works is that you have a soft iron core with two coils of wire: one for input and one for output. If the input coil has more windings than the output coil the voltage decreases, if it has fewer the voltage increases. Because you can't get something for nothing, lower voltage means higher current and higher voltage means lower current.
Transformers and Travelling
Not all countries use the same electrical systems, for example the US uses 110-Volt mains instead of the 240-Volt mains used in Australia. That means that if you were to plug a US appliance into Australian mains it would fry. Travel electrical adapters aren't the answer, either; they just change the plugs. What you need in that situation is a 240V step-down electrical transformer that converts the current to something the US appliance can handle.
Features to Look For
For all their simplicity, transformers have a lot of features to consider. For travelling, you're best off with one that handles both step-up and step-down. That way you can use appliances from any country in any other because the voltage goes both ways. Also consider the wattage your transformer can handle, you want to double-check that your transformer can supply enough watts before plugging anything into it.
The biggest concern for any transformer is heat. No process is one hundred percent efficient and all electrical losses turn into heat. That's why the charger for your mobile heats up when you use it.