Looking after your chain will help it last longer, see this page for how to lubricate it, but at some point it will wear out. This wearing is often called ‘stretch’, but that’s a misleading name for it. Chains don’t actually stretch – the rollers and pins wear out making them loose, so under pressure they are able to move apart. It’s not much, but if left unchecked it can accelerate wear on other components.
A completly worn chain will start to cause wear on the rest of your gears. The chainrings (the big cogs at the front) and the cassette (the smaller cogs at the back) are expensive, but changing your chain early will help these parts last much longer. If a chain is very worn then it will have worn all your cogs. You will not be able to change just the chain; you will need to replace all the cogs too.
The easiset way to tell if a chain is worn is by using a chain wear gauge. These are relatively inexpensive and will help you decide when to replace your chain.
Another way is to use a simple ruler, graduated in inches.
With the chain under tension measure 12 chain links. A brand new chain will measure 12 inches from pin to pin. If the measurement between the pins is longer that 12″ then your chain is showing signs of wear.
If the chain is worn by an additional 1/16th of an inch then it’s time to change it.
If the chain has ‘streched’ by 1/8th of an inch then you have probably caused additional wear the the cassette and chainrings. If your chain is worn this much (or more) then you willmost probably have to replace other parts – chainrings, cassette, jockey wheels. Just changing the chain will likely cause more problems than it solves, because your new chain will not fit correctly on your over-worn cogs, causing your chain to slip under pressure.