In recent years, they've made the fare structure a lot simpler than it used to be. You can buy one-way tickets one at a time. If you're going to make more than 2 trips in a day, it will be less expensive to buy a day pass. If you are staying longer, you can get a slight discount by buying a multi-day ticket.
The ticket machine will print a ticket, which you should keep with you while traveling.
This picture was taken in late 2009. At that time, fares had not gone up in more than three years. They may have changed since then, so if the exact amount is important to you, check their current rates.