If the input is AC, use a transformer.
If the input is DC, you will need a DC-DC converter.
For a DC-DC converter, whatever your current requirements are at 24v, you will need roughly six times that much current at 5v, depending on the efficiency of the DC-DC converter.
24v/5v=4.8
Assuming 80% efficiency, 4.8/80% = 6.
So, for each 1A of output current required, you will need 6A input at 5v.

Transformers are quite efficient. For AC, if you need 1A out at 24v, you'll need around 4.9A at the input.

Thanks guys!! I think I should have been clearer. I have a 24V power supply. I basically need the 5V input to act as a switch between the drive circuit and 24V supply. Kind of like a relay, only here, I need lower currents < 50mA. The power supply is a 24V, 12A industrial supply. Currently, I am using an opamp LM324 to do this, where 24V and GND are on the rails, but I thought I needed a better circuit.

Excuse me for being "old school" but you can do this with bipolar transistors. I don't mess with static sensitive parts if I can avoid it. An NPN arranged common emitter so the 5 volt signal turns it on and its collector pulls down the base of a PNP transistor that delivers the +24 to the load.