It looks like what you've got hold of there is a SWITCHING power supply. They are more complex than the linear supply you probably made, but they are more efficient. You can find lots of information on the web to explain how these supplies work.
The fundamental difference is that the POWER(not current) into a switching supply is the same as the POWER out of the supply, less losses due to inefficiencies in the circuit, whereas with a linear regulator the input and output CURRENTS are the same, which means that you lose (Vin-Vout) * CURRENT in heat. For low currents, linears make more sense but as current requirements go up, the switching topology makes more sense. (Switchers do have the negative effect of generating a lot of electrical noise, which can be a problem in low-level circuitry.)