You need to complete the foundation programme (2 years)* and then enter paediatrics specialty training. Paediatrics specialty training takes eight years to complete full time, so you can apply for consultant posts after that. During those eight years you will be a doctor in a hospital or sometimes in the community working with children and their families.
*It's possible to get a paediatrics post during the foundation programme, but that would usually only be for four months and it's not something guaranteed.