I'll second what others have said about having a good day job. I'm self-employed and (for the past few years, at least) have made a substantial portion of my income from writing, but it's not my only source of income, and for a long time wasn't my primary one. I started small, getting some of my work (mostly romance and erotica) accepted by small digital publishers. I did make some decent royalty checks off of this, but it wasn't nearly enough to live on. My big break didn't come until I was in my thirties and had been writing for many years.

Regarding the tax stuff, I don't know how it works for self-published writers, but publishers will send you a 1099-MISC form at the end of the year with your total earnings; you have to keep track of and deduct any expenses (agent's fees, etc.) from this amount.

Getting to a point where you can earn income from your writing often takes patience, but it is doable. Keep writing, keep honing your craft, keep sending your work out and investigating your options. And network with other writers to get a sense for how they're doing things. This forum is a great place for that, so you're already on the right track.