An H-atom at a carbon chain, or any atom group at such a chain, can be replaced by another atom or group of atoms.
The substituent is the one that replaces the old one.
For substitution at an aliphatic chain, you heed light and heat.
For substitution at an aromatic chain of ring, you need a catalyst.
The alkanes can easily undergo any substitution process, where an H is substituted by another atom, for example, a Halogene.
The process is rather slow.
Substitution with, for example, Chlorine (Cl2) is a slow process and needs light energy.
The nitril group
A – C≡N group is called "nitril", when the C is part of a main chain.
When a – C≡N group performs as a side chain (the C does not take part of the main chain), than the name 'cyanide' can be used, just like in the inorganic chemistry with cyanide ions: -CN-
Nitril groups can be introduced / made in a substitution reaction of cyanide with a halogene alkane:
The Nitril group possesses a threefold bonding. With the consequence that not addition is possible, not just one or two, but even three times..
This is very special.
A special rule is: more than one OH-group connected to the same C in a carbon chain is not stable; water will be produced.
First we add three molecules of water to support the addition, but eventually one molecule of water will return.
You can also see that finally an alkanoic acid and ammonia are formed, the two final products.
Substitution with the side product H3PO3
There is a methode to substitute an OH-group of a chain, by a halogene, using the reaction with 'phosphor trihalogenide'.
Substitute H-atoms of Benzene is easy going.
The stable structure of the ring does not lose its stable character in this process. The 6 C-atoms remain connected, without enay change.
Benzene suffers substitution with various groups: nitro, amino, alkyl, sulphon and others.