Bike oil is a cheap "alternative" to WD-40 as a chain lube, but it does attract dirt.
You can get solid wax lubes, which come dissolved in a solvent, eg White Lightening/Pedros.
Dry teflon-based lubes which spray on the chain.
Wet teflon enhanced oils which are sprayed or drizzeled onto the chain.
I use WD-40 as a rust inhibitor inside the steel tubes, and as a short-term lube forbrake and derailleur pivots in the wet. I have used it as a short-term chain lube when nothing else was to hand. Its better than running a dry chain, but wont give lasting protection.