Before a baby bird leaves the nest, it will rely on the mother bird to feed it. However, they are not given whole insects. Instead the mother bird will eat the insect and regurgitate it to feed to the babies. This will ensure that it is small enough for the chick to digest properly and will prevent them from possibly choking.
Once a chick leaves the nest it will start to fend for itself, although it may take a while to master catching fast moving insects. Often they will rely on bird seed and nuts in bird feeders or slower insects. If bird feeders aren't an option, or the chicks are struggling to find food, the mother will continue to give them insects until they can manage.
If a baby bird is found in the wild, it is advised to take it to a local vet rather than trying to feed it yourself. Often if a baby bird is found on its own it may have fallen from the nest, been attacked by a cat or have the scent of a predator resulting in it being abandoned. In these cases it will require treatment as well as being fed.
All in all baby birds pretty much eat the same as adult birds but in smaller quantities and regurgitated for ease and safety.