How to create a costing variant in sap

Costing variant in sap determines how product expenses are to be calculated in sap. We have two types of costing variant in sap; Planned costing variant Actual Costing