The HC-SR04 sends out an ultrasonic pulse and measures the time it takes for the echo to return, letting your microcontroller calculate distance. It works on 5V DC with a sensing angle of up to about 15 degrees.
It measures distances from about 2 cm to around 4 metres, making it ideal for robots, water level indicators, smart dustbins and distance meters.