Linear regulators work by dissipating the difference between input and output as heat, so you can't really use them like a "magic pill".
For example, most can only dissipate up to about 15 watts, with a very good heatsink... in practice, with normal regular heatsink you'd want to NOT go over about 5-7 watts.
So, let's say you want 9v and 1A of current and you want to use a 7809 linear regulator to achieve that ... this means the chip will produce (12v input - 9v output ) x 1A current = 3 watts as heat. This is reasonable and a normal heatsink and some air around the regulator will be enough.
You can't however have a 24v power supply and use a 7812 linear regulator to get 12v at 1A ... the chip would dissipate 12 watts, which is kind of hard to move away from the chip even with a large heatsink, a fan would probably be required.
Another thing you should understand.
With linear regulators, what current goes in, that much current goes out ... so if you want 9v and 1A using a 7809 linear regulator, whatever gives power to 7809 must be able to give 1A of current.
With switching regulators, it's not the same.. the current at the input is smaller than the current at the output, in the case of step-down regulators. As an example, if you use a switching regulator chip to produce 9v at 1A from a 12v power supply, that means the circuit consumes about 9v x 1A = 9w plus about 1w due to circuit being about 80-85% efficient only so in total about 10w. With a 12v power supply, this means the current used from 12v is about 10w / 12v = 0.84 A ... With 24v input it's about half that.