At DEL, stay airside—T3 has excellent lounges and dining, and immigration plus traffic make exits impractical.
A 3-6 hour layover in Delhi is very feasible thanks to the excellent Airport Metro Express. Line runs directly from Terminal 3 to New Delhi Station in 20 minutes for 60-90 INR ($0.80). Old Delhi is 5 minutes walk from New Delhi station. Head to Chandni Chowk for paranthe wali gali (stuffed flatbreads, $1-2 each), buy spices from the spice market, and return. Allow 75 minutes back to the airport including check-in time.
Six to ten hours opens up both Old and New Delhi. Start at Jama Masjid (largest mosque in India, free entry, cover shoes and head) adjacent to Chandni Chowk. Walk the bazaar lanes. Metro to Udyog Bhawan for Humayun's Tomb (UNESCO, $7 entry) - the architectural predecessor to the Taj Mahal, usually less crowded. The surrounding Lodhi Garden (free) is a peaceful park with 15th-century tombs scattered through it. Khan Market is 10 minutes walk from Lodhi Garden for good cafes and lunch. Return by Metro - allow 75 minutes including the Airport Express.
With 10+ hours, add Qutub Minar (tallest brick minaret on earth, UNESCO, $7 entry) in the south of the city to your circuit. The Metro covers the whole city efficiently. The National Museum near India Gate has outstanding collections of Indian art, Harappan civilization artifacts, and Buddhist sculpture. Lodi Colony's street art district (30+ large murals, walkable in 45 minutes) is one of the best in Asia. For food: butter chicken originated at Moti Mahal restaurant in Daryaganj (book ahead). Karim's restaurant near Jama Masjid has been serving Mughal meat dishes since 1913. The Dilli Haat craft market near INA Metro station has artisans from every Indian state and excellent food stalls representing regional cuisines.