Product variants are used to manage products having different variations, like size, color, etc. It allows managing the product at the template level (for all variations) and at the variant level (specific attributes).
Before you can use product variants, you must first activate the product variants in the settings. To do so, you must go to the Sales app. In the menu Configuration ‣ Settings, locate the Products Variants line, and tick the option Products can have several attributes, then click on Apply.