The links no longer bend smoothly. You can spot them by pedaling your chain slowly backwards and watching the way each link passes through the tight turns of your rear derailleur.
Most arise from dirt or corrosion between link plates; these can be fixed by cleaning, lubricating, and flexing back and forth. Others are caused by improper pin installation (the pin that holds the chain links together is not fully inserted through the links and rollers) or severe chain damage. When link pins are poorly installed, they can be worked into position by shifting them back and forth inside their chain plates using either a chain tool or your hands. Damaged chains should be replaced in their entirety.
Chains become longer as they wear. As a result, this is called stretching, which is a misnomer since nothing actually stretches. As wear occurs between rollers and link pins, chains lengthen. There is slop or free play that can lead to gear "skipping" in some cases. This also causes extra wear and tear on your chain rings and rear cog teeth.
Chains are cheaper to replace than cog sets. Use a chain wear-indicator tool to check whether your chain needs replacing.