New Delhi is about 2000 km (over 1200 miles) north of Hampi. There are two broad options to travel from Delhi to Hampi : by Flight and Train.
Well, there are no direct flight or train to Hampi. In both the cases you'll need to aim for the nearest cities for further connections.
Let's see the train option first. Karnataka Express (Train No : 12628) connects New Delhi with Bangalore. This train travels via Guntakal Jn (GTL) from where you can get another train to Hospet Jn (HPT), the nearest railway station for Hampi. From hospet take a local bus/auto rickshaw/taxi to Hampi (about 13 km).
Karnataka Express scheduled arrival at Guntakal is 6.40 AM, after two nights and a day's travel from Delhi. There are many connections from Guntakal to Hospet. The ideal connection train would be the Kolhapur bound Hyderabad-Kolhapur Express ( Train No:11303) . The scheduled departure of this train from Guntakal is 7.50 am. There is a 50 minute gap between the arrival of Karnataka Express and the Kolhapur Express.
Also keep in mind if the delay in arrival of Karnataka Express is more than 50 min, you would miss this connection. There are are other trains too to Hospet in the afternoon from Guntakal to Hospet.
If everything goes well on schedule, you'll leave New Delhi in the night by Karnataka Express. Arrives at Guntakal on the 2nd day morning and at Hampi by noon.
Other than Karnataka Express there are host of weekly and biweekly trains towards Bangalore from Delhi. But all do not follow the same route of Karnataka Express.
Another alternative is to fly directly to Bangalore or Hyderabad from Delhi (there are over 20 daily flights).From Bangalore travel to Hampi by Hampi Express or even by bus. It's 3 hours flight between Bangalore and Delhi, and overnight journey by train to Hampi (Hospet) from Bangalore.
By the way if you arrive at Hospet by one the odd hours train (late in the night), you may want to check in at a Hospet hotel than traveling to Hampi in the midnight. You have the option to keep the base at Haspet for the rest of you stay, or move base to one of the Hampi's hotels, next day morning.
From Hospet explore the train options based on your onward itinerary. Hospet Jn sits in the middle of the Hubli-Guntakal route with many long distance trains passing through it. See also how to travel in and out of Hampi from other cities around this part of India.
Cauvery Express or Kaveri Express ( Train No: 6222 / 6221 ) is a long distance train that links the capitals ( Bengaluru and Chennai ) of two south Indian States, Karnataka and Tamilnadu. This No. 6222 express train starts from Chennai Central and terminates at Mysore in Karnataka (via Bangalore) . The down train No 6221 travels in the reverse direction. The pair operates daily. Usually the trains are packed, especially during the weekends . So an advanced reservation is highly desirable, as the seat / berth availability is an issue if not reserved well in advance
Amaravati Express (Train No.18047 / 18048 ) is a cross-country train that connects east India to the west. That is, Goa (Vasco-da-Gama) in the west coast with Howrah Junction in the east.
This train travels via Hospet Junction, the nearest railway station for Hampi. Those coming from the eastern parts of India to Hampi, this is a suitable train. The train covers its 2155 kilometers (1340 miles) journey in 2 days.