You can buy tickets online, from the station agents at staffed stations, from Ticket Kiosk machines, or on board the train.
Ticket Kiosk machines are located at all stations except Oakland Coliseum and Hayward and accept cash, debit, and credit cards.
If you purchase tickets on board, you will only be able to buy a one way ticket and a surcharge will be applied unless you are boarding at an unstaffed station. The conductor will accept payment with cash or most major credit cards. Certain deals and promotions can only be purchased online and require advance purchase.