Oil lamps were used for lighting before electricity became widespread. They provided illumination through the burning of oil in a reservoir, with a wick allowing the oil to travel up and be burned. Over time, oil lamps were replaced by other technologies as electricity became more available and affordable in homes and businesses.