how do they make travel adapters so small?
The smallest travel chargers / adapters available these days do not contain a magnetic transformer.

Instead, isolation and AC coupling is achieved by using piezoelectric transformers: These are really tiny, and flat, in comparison to the conventional magnetic coil based transformer, and work at greater efficiency as well. The frequencies involved are not AC power line frequencies, they are much higher.

See the image below:



The design is the same as described in the answer by Nick Alexeev (switched mode), with power line AC being rectified to DC, then high frequency AC generated, isolated via the Piezoelectric transformer, and rectified again for DC.

The use of high frequencies also reduces the required size of capacitors for smoothing the DC voltage, another key factor contributing to the bulk of older chargers / wall warts.



For additional information about such tiny travel chargers, see this answer.