21M was built-in to the specification. I don't know the entirety of the reason, but presumably to help prevent decreasing the value of existing bitcoins for all time. (If you kept minting them, there'd always be new ones devaluing existing ones, like how the US gov't does with dollars).
Buying means you buy already-minted bitcoins. You can buy them privately or on exchanges. Then they're yours. The exchanges' role is to facilitate trading between users, and they operate at a profit (they charge you a % to buy). Basically, it'd be hard to sell your bitcoin if you didn't have exchanges. You'd be posting on craigslist or something. And people would be scamming you for the money. Stuff like that.
Anyone can mine on virtually any hardware, however due to competition, it's hard to mine profitably. You have to have specialty equipment that is both very good and very efficient (power-wise). You can mine on your own or as part of a pool, but you essentially have to 'get lucky' on your own, and it's very unlikely that'll happen. My advice is to not think about mining until you've done a lot of research and for some reason decide you want to do it. It's a bad idea for almost every non-expert at this point.