Ferry or aeroplane are your only two options. All ferries terminate in Castlebay, coming from Lochboisdale, Oban and Tiree. The ferry from Oban will take just under five hours, the Calmac website will have costs and booking information.
If you fancy flying, you can catch a small aeroplane from Glasgow directly to Barra Airport on the island's north side.