The primary connectivity to Hampi is by road. Rail connection comes second and the air link is a third option.
Hospet, a small town located about 12 kilometers (8 miles) from Hampi is the nearest railway station. This is the main gateway to Hampi. Hospet is connected by rail to other important towns like Bangalore, Bijapur, Hubli , Guntakal ( a major rail junction) , Hyderabad and Vasco Da Gama (Goa). Train is a preferred mode
Hospet has a bus station too with frequent bus services to the above mentioned places. The local bus service to Hampi starts from here.
The nearest airport to Hampi is Bellary (60km/ 37miles). Other airports are Belgaum (190 km/188 miles) and Bangalore (350 km/ 217 miles). Flight connectivity varies depends on the destinations.
The typical access strategy to Hampi is simple (well, the standard Indian disclaimers apply!).
Get airdropped in India, that's if you are not from India.
Reach the nearest major town or city close to Hampi. When I say close, it could be a place anywhere from 100 to 300 kilometers (about 60 to 200 miles) away from Hampi. These places are in general connected with the rest of the Indian cities by rail, air and road. A few examples are Bangalore, Hyderabad, Goa and Hubli, that can be labeled as the near major cities to Hampi .
Travel onward to Hampi.
Hospet, the gateway town to Hampi, can be reached by bus, car or by train. Typically it's an overnight journey from Bangalore, Hyderabad or Goa.
From Hospet catch the local bus or hire a taxi/auto-rickshaw, in about 30 minutes you would be dropped at the centre of Hampi.