Basically a transformer is 2 coills wrapped around opposite sides of an iron square, when a current is passed through one coil it induces a magnetic field in the iron core which in turn induces another current in the other coil, if there are different numbers of turns on the coils the one with a greater number of turns will have a bigger current induced and therefore a bigger voltage hence stepping up, the opposite is also true for a step down.