Koh Tao is only reachable by boat. The closest large city on the mainland is Chumpon. Boats leave Chumpon in the morning, weather permitting. The trip can take from two to three hours. There are also boats from Phangan, Samui and Surat Thani on the mainland. From Phangan the trip is from generally around 30 minutes. From Samui, it takes 1 hour 30 minutes, plus however long the boat stops in Phangan. The overnight boat from Surat Thani takes 9 hours.
Lomprayah offers a combined bus and boat service from Bangkok to Koh Tao, and on to Koh Phangan and Samui if desired. Buses leave Bangkok twice daily, stop in Hua Hin, and then terminate in Chumpon, where you transfer to their high speed catamarans for a one and a half hour trip to Koh Tao.
Packages from the major dive operators may include transportation and even lodging on Koh Tao.
Seatran Discovery runs a daily excursion from Samui, stopping at Koh Phangan and on to Koh Tao. They then move on to Koh Nang Yuan for a bit of snorkeling, move to Mango Bay for some more, plus lunch, then return to Koh Tao, Phangan and Samui. You can buy a ticket for the whole trip, or just use the boat for inter-island transfers. See their web site for more information.