There are at least three ways, though only one of them looks rational today. First, you could mine your own bitcoins. Second, you could buy some from an exchange. Third, you could buy shares in a fund that has invested in bitcoins.
Please note that answering your question is not a recommendation, and I am not qualified to give advice on investments. However, as electronic payments expert Dave Birch put it to me on Twitter: “one doesn’t invest in bitcoin, one gambles on bitcoin”.
The problem is that people can make money by buying things that are essentially worthless, such as used postage stamps, Beanie Babies, and (historically) tulip bulbs. Tulipmania operated on the “bigger fool” theory, also known among stock traders as “momentum investing”. For example, tulip bulb prices may be insane but they keep going up. I may be a fool to buy them, but I expect a bigger fool to buy them from me. Simply replace “buy low, sell high” with “buy high, sell higher”. This works until you run out of fools.
However, you can buy things that don’t depend on bigger fools appearing, such as land and gold. Their prices may vary dramatically, but over the long term, they retain real value. When tulip bulb prices were tumbling, everyone wanted to sell. When gold prices tumble, people with money look forward to an “investment opportunity”.
https://www.theguardian.com/technology/askjack/2017/jun/29/how-can-i-invest-in-bitcoin
Aside from the questionable encouragement for new users to experiment with mining, the article continues the cringe-worthy trend of the mainstream media's fixation on comparing Bitcoin with tulip bulbs. Clearly they're starting to make a small effort to at least try to appear balanced in their appraisal, but it's very much a case of baby steps. It's bizarre considering the Guardian are equally capable of producing articles like this one, which adequately highlight the shortcomings of government-backed digital IOUs.