Mostly online searches and reading the software's documentation. Unfortunately there appears to be no site that walks you through the entire process. You'll find "how to set up exim" tutorials and "how to get dovecot working with exim" but so far I have found no overall soup-to-nuts guide that matches my exact configuration.
1. You need your own domain
2. If you're new to Linux, I'd set up something simpler first, like a web server just to familiarize yourself with your domain tools and your distribution's configuration.
3. A good half-way solution for migrating from Gmail is to set your own server as MX for your domain and forward received E-mail to Gmail. That way you can get familiar with setting up your MTA without worrying about delivery. And, you can start encouraging people to start sending mail to your @domain.com address rather than @gmail.com address. I had this set-up for years before taking the plunge and hosting everything myself.
Be warned, Gmail applies very aggressive filtering to your incoming forwarded mail, even before it reaches your "Spam" folder. This was one of the primary reasons I decided to self-host: I was finally able to compare the list of E-mails I received, through looking at my logs, to the E-mails that ended up making it to Gmail. Gmail's (presumably) spam-filtering was filtering out an unacceptable amount of false positives.
4. Set up your host to deliver locally. You'll be able to verify it's working by using standard unix mail tools running on your host.
5. Set up something nicer for delivery like IMAP, and get your favorite mail client to work. I use Dovecot, but there are plenty of options.
6. Any bells and whistles you want. TLS, SPF, DKIM, Spamassassin, multiple domains. I found at first I was getting a massive amount of spam (thanks for fixing this for me for years, Gmail!) but after a few months of training, Spamassassin is very good and I'm back down to not seeing much anymore.
Hope that helps. To your other question. I spend $5 a month for my VPS, and I can host a lot more than E-mail there.