Most temporary visitors may enter Turkey either without needing a visa at all or by easily purchasing a "sticker visa" at the point of entry (airport, maritime port, or land border-crossing).
The procedure is simple and straightforward. You hand the clerk your passport and the visa fee in cash, the clerk applies a sticker visa on a page of your passport and you're already on your way to immigration. The clerk does not look you up in a database, scan your passport or even take your name. The whole process takes less than a minute.
In essence, the sticker visa is just a tax levied on tourists.
Please make sure your passport is valid for at least 90 days from the expiration date of your visa period. Otherwise, you may not be allowed to enter Turkey. This means that if you are entitled to a 90-day visa, please be sure that your passport is valid for at least 180 days beyond the date you are planning to arrive in Turkey.
It is also possible to obtain a tourist visa from any Turkish consulate in advance, but this entails considerable time, trouble and extra expenses, in the form of visa processing fees. It is much simpler to simply buy your visa sticker at the border if your nationality does not require you to obtain a formal visa beforehand.
Note that rules seem to change regularly, so see www.e-konsolosluk.net and the Turkish Embassy or Consulate in your home country for the latest information about visa requirements.