Lamp oil is obtained by distilling Swamp tar, using the lamp oil still located in the Chemist's House in Rimmington, or Miltog's Lamps in Dorgesh-Kaan. You need to bring the Oil lamp, Oil lantern, or Bullseye lantern to fill it with the lamp oil. The oil will stay inside the lamp oil still until you use the item in your inventory on the still.
It is recommended to use the Lamp oil on the Bullseye lantern, as the lantern is the only light source that uses Lamp oil which stays lit unless the player manually extinguishes it, as it does not cause an explosion in the Lumbridge Swamp Caves, nor does it go out when players fail a shortcut around water, and the Lantern is used in Tears of Guthix and Lunar Diplomacy to make other variations of itself used for the quests.
Oil lamp (empty) + Lamp oil → Oil lamp (oil) + Tinderbox → Oil lamp (lit)