A combination of extensive research, communication between other hobbyists, along with a dash of first hand experience.
It started just wanting a center piece in my room, a nice fish tank to look at and I always loved aquariums. As a child, my dad helped me care for goldfish and ten years later I realized with a job and lots of free time I could put together my own community tank. So last March, with my tax returns, I went out and bought a pretty clean and slick 15 gallon. It came with an internal filter, a really good heater that I'm still using, slow gradual lights and pretty decent ones at that. I had blue gravel and a lot of decorations... then that's where the addiction kicked in. Now my 15 is a heavily planted garden with micro fish, I also have 55 gallon community tank with live plants, and a 5 gallon with a hardy betta fish who started out from a small cup, to a 1 gallon, to a 3.5 gallon and now to a 5 gallon. I also have a 10 gallon quarantine tank, that's 4 tanks I have running, that's ridiculous in my opinion. But people on these forums have way, way more.
I've been reading books, talking to a lot of people, it's all become such a complex and complicated hobby, but I love it. Attempting to replicate different ecosystems is interesting and fun. I see it as a form of art, putting together a tank and keeping your fish healthy and happy gives you a good feeling. You're caring for the smallest of nature's creatures. Soon, I will be dipping my feet in the saltwater side of the hobby, never would of thought I'd go this far. But this hobby has grown on me a lot, and I'm glad to see other people enjoying it, too.
Anyways, the reason people on here know all this stuff, is because their passionate about the hobby, we love it so much a community was formed around it.