A chainguard covers all or part of the chain and protects the rider’s clothing from oil. It can also prevent clothing from becoming trapped between the chain and chainring or, a more common problem, from getting snagged on chainring teeth. Chainguards are not suitable for use with a front derailleur.
On old bikes, chainguards are made from steel. This has the slight disadvantage that, if it gets bent, the chain can rub against it, which is extremely noisy. Plastic chainguards are available, which avoid this problem.
Full chainguards fully enclose the chain, but this makes it difficult to remove the rear wheel to fix a puncture, because the chainguard needs removing first. Full chainguards are compatible with single speed and hub gears; they are not suitable for use with derailleurs.
A half chainguard, one that covers the top run of the chain and front of the chainring, provides almost the same protection and doesn’t need removing if you have to remove the rear wheel. They are compatible with rear derailleurs but not front derailleurs (so if you want to use a half chainguard with derailleur, you need a single chainring set up.)
A chainring guard covers just the chainring, not the chain, but still provides some protection.