User blog:Mornelouwdaddy/How to add badges?

Recently, I was online on a site with a Leaderboard, that got me thinking: How do I add badges?