I am learning about basic electronics and attempting to establish a firm foundation of understanding on the basic principles involved. However I have run into a problem. Ohm's law is rather basic. V = IR. Great, no problem. But in the context of a transformer, how does that apply? From what I have read, if you step up the voltage, you lose current, if you step down the voltage, you increase the current. But according to Ohm's law, the only things that effect current is resistance and voltage.

Free power does not exist, so how do you determine voltage gain/Current loss and vice versa?

To clarify, if I have 10 volts on a circuit with 500 ohms resistance, my current is 20ma. If I step up the 10 volts to 50 volts(with 500 ohm resistance still), I magically get 100ma! Unfortunately that is not how it works.

Thank you.