There are quite a few trains for Hospet from various cities. The most sought after option first. There is a night train from Bangalore to Hospet , the Hampi Express. This is the convenient means to travel from Bangalore to Hubli, via Hospet. Book your ticket for Hospet Junction (HPT) from Bangalore.
It's not unusual to get this train over booked weeks in advance, especially for the weekends.
And of course there is a sloooow Bangalore to Hospet passenger train. It takes a ridiculous 15½ hours to reach Hospet from Bangalore . In any case if time is not a premium and you want to see the rural Karnataka pass by, catch that Hubli Passenger (Tran No: 583) .By the way the fare too is absolutely cheep - Rs 146 for the second-class reservation with sleeper berth, Rs . Train leaves by 10 in the night and reached Hospet by 1.20 in the afternoon next day!
What about the bus options from Bangalore to Hospet ?
Bus is not a bad idea either, especially if you could not get a berth reserved in the train. See to that you book in one of the higher class services (like Rajahamsa or Airavat), if you prefer better comforts.
KSRTC (Karnataka State Road Transport Corporation) operates a number of services from Bangalore that either terminate at Hospet , or pass via Hospet. What more , one service - the Bangalore-Hampi Rajahamsa service - drops you right in the middle of the Hampi ruins.
There are about 20 KSRTC services everyday that connect Bangalore to Hospet. About 14 Karnataka Sarige , 9 of them are the Rajahamsa and 1 Airavath in the increasing order of comfort/luxury and cost.
Do yourself a favor by reserving the ticket in advance. It is easy to do it online and print your own ticket. Log on to the KSRTC website.
Fare for Airavath service is Rs415. For Rajahamsa it is Rs361 and for Karnataka Sarige it is Rs257. You get a 10% discount, if you book both up and down journeys together. The journey duration is about 7 hours.
You'll also find a decent number of private operators that run regular daily services between Bangalore and Hospet.
What about the driving option?
You can drive from Bangalore to Hospet. The two highways you'll be using are in good shape.
Schedule for about 6 to 7 hours driving time including a couple of short halts in between. The first lap, between Bangalore and Chitradurga is 4/6 lane NH 4. This is part of the Golden Quadrilateral. Expect a bit of heavy vehicle traffic on the NH4 , through the traffic moves faster. From Chitradurga bypass take the National Highway 13 ( now renamed as NH 169 ), relatively less busy compared to the NH4.
You’ll be following the route
NH 4 (Driving distance 150 kilometers approx.) Bangalore --> Nelamangala --> Dobbasapete --> Tumkur --> Urkeri --> Nelahalu --> Sira --> Javanagondanahalli --> Hiriyur --> Ayamangala >Chitradurga (bypass)> Lakshmisagara
NH 169 (Driving distance 150 kilometers approx.) Lakshmisagara --> Chikkannanahalli --> Jagalur --> Hosahalli --> Kudligi --> Shivapura --> Chilakanahalli --> Mariyammanahalli --> Hospet
This map details the location of Hampi in Karnataka, India. This web site has many maps on the Hampi ruins site. You may be also interested in Distance to Hampi from various places.