Like Grump said. Read all that. But here is what I do for lubing my chain.
The rear wheel must be off the ground in neutral. Having a lift is easier. Otherwise you gotta roll and lube.
Kerosene clean and lube every 500 miles. A chain brush is the best for use with the kerosene. Put some kero in a jar, dip and brush against chain as you turn the wheel. Dip and clean bruh every couple of turns. Wipe kero from chain with cloth or paper towel and dont get it on brakes.
Apply very little "Chain Lube" spray as you turn the wheel. Wipe it clean with paper towel. If you can, make sure you have garage door open or do it outside. This stuff stinks.
Best time to do this is after a ride when chain gunk is stil warm or after a 5 minute ride around the block.