Here are Turkey's major bus companies.
This Great Istanbul Bus Terminal (Büyük Istanbul Otogarı), as it's formally named, is 10 km (6 miles) northwest of Sultanahmet Square in the district of Bayrampaşa, near the district of Esenler (map).
(If you're going to the Balkans, Armenia, Georgia or Iran, consider the Emniyet Garajı.)
To travel between the Otogar and Taksim Square, the most direct way is via IETT city bus 83-O (Otogar-Taksim), which runs every 20 to 25 minutes from 06:30 am to 21:30 (9:30 pm). The trip takes about one hour. You must buy a jeton before boarding the bus.
With 168 ticket offices and gates, its own Metro station, shops, restaurants, hotel, police station, clinic and mosque, the Büyük Otogar is virtually a town in itself. You can catch a bus to Berlin or Baghdad, though you're more likely to be looking for one to Edirne, Ephesus, Gallipoli or Cappadocia.
See my chart of Buses from Istanbul to Other Cities.
You can usually just show up at the Büyük Otogar and catch the next coach to your destination in less than an hour, except at holiday times, when many buses may be fully booked in advance.
Hundreds of companies run thousands of buses,mostly big, comfortable and new, day and night. Dozens of companies connect Istanbul and Ankara, with a bus leaving at least every 15 minutes, 24 hours a day. More on bus travel in Turkey...
Here's the Büyük Otogar website (in Turkish).