How did colin die in Harry Potter book 7?

Colin died because even though the battle was supposed to be for seventh years and older, he joined the battle and didnt win his battle.