@14Fan
I’m not a mod, but usually it’s by completing certain art events. Usually there will be a banner at the top of the page for those badge related art events. If you follow the requirements of the event usually that will be how you earn a badge. :)
There are a few badges unrelated to art events that you earn when you hit certain upload milestones, under a certain preselected criteria. :)
There can even be a couple upload badges for tagging images well and helpful metadata updates, such as #1 Assistant (the Spike one, for 3,000 metadata updates), Notoriously Divine Tagger (Moondancer,for consistently uploading images above and beyond the minimal required tags), and Cool Crow (the highest, for 10,000 metadata updates).
There’s also the custom badges, which you can request an OC for, if you have donated to the site in any way as classified
here. ;)
Certain badges in the past (before I joined Derpibooru) were also obtainable by participating in a collaborative art pack or attending the Derpibooru panel of MLP conventions, but I don’t think they hand those ones out anymore.
There are the tags for more suggestive/explicit uploading milestones too, such as Lady’s Wink and Perfect Pony Plot Provider, but I wouldn’t recommend getting involved in those. :/
Hopefully this overview helps you :D
Also I saw you just joined Derpibooru 16 days ago! Welcome and I hope you enjoy your time here with us! ^w^ 🥳🤗