There are several ways to buy bitcoin.

1. Trade on a specialized bitcoin exchange.

An exchange is a platform allowing trades in various currencies and assets. To participate in this trade, you will have to register and provide some kind of ID. Bitcoin is anonymous but bitcoin exchanges have to respect local legal requirements concerning anti-money laundering measures.
To add bitcoins to your balance, you will have to tie your bitcoin exchange account to your bank account: most exchanges do not accept payments from bank cards, although there are some exceptions. After that, you may trade bitcoins with other users of the exchange.
The most popular bitcoin exchanges are Bitstamp, BTC-e, Kraken, Huobi, OKCoin, BitFinix, and BTC China.

2. Buy through a bitcoin wallet.

Some wallet providers, including Coinbase and Xapo, allow you to buy the digital currency directly from your wallet, using a fixed rate. To do this, you will also have to tie your wallet to your bank account.

3. Peer-to-peer purchase of bitcoins.

To buy bitcoins from an individual, you will need to find a seller who has the sum you need. You may find a broker on the LocalBitcoins website, but in that case the purchase entails a certain risk. The rate, however, may be lower than on a bitcoin exchange because both the buyer and the seller save on fees.

4. Purchase through ATMs and kiosks.

The network of bitcoin ATMs all over the world is growing steadily. ATMs accept cash and provide you with codes that can then be used to upload the bitcoins to your wallet. You may find your nearest bitcoin ATM with on the bitcoinatmmap website. In addition to this, there are new ways of buying bitcoins appearing every week in various countries: through bitcoin kiosks, tobacco shops and post offices.