Under 18s in trouble with the law

What happens if a child gets in trouble with the police, their legal rights and support such as youth offending teams (GOV.UK).