As NDIY says, WD40's lubricating properties are temporary and using it might even be harmful: I use WD40 to clean oil and grease off and it's a very thin lubricant at best.
Mostly I use old-fashioned 20-40 motor oil because it's cheap and readily available. I avoid modern types like 5W40 because they're designed for hot engines. These oils are thin at low temperatures (which aids winter starting), but thicken up to lubricate properly as the engine heats up. As Lathes don't heat up like engines, they never get the full benefit! Modern oils are also more likely to contain additives which may not be ideal for a lathe.
ISO32 Hydraulic Fluid is good for lubricating machine tools; I buy it when I see it.
Slideway Oil is better than motor oil on machine tools because it's distinctly sticky. Ordinary oils tend to get pushed off slides leaving them dry, making regular squirting on of new oil advisable. Slideway Oil lasts longer between applications and is less likely to run off the vertical slide on a milling machine.
That said any oil is much better than no oil and hobby lathes really aren't fussy.
Dave