Most ceiling fans are shaded pole and they can be reversible.
The poles have two shading rings, one on each side of the core. Each has external connections to the switch. When the direction is changed one ring circuit is broken and the other is completed.