(A) Fixed cost: Firm cost which remains unchanged even if production is reduced or increased or production is temporarily suspended is called 'fixed cost'. Fixed expenses such as land rent, house rent, salaries of permanent employees, compensation expenses of machinery, interest on long term loans etc. Whether production is high or low or production activities are temporarily suspended, the firm has to bear the cost of all these fixed components. For this reason, all these expenses are called 'fixed cost'.
(B) Variable cost: The cost that changes as the amount of production of a firm change is called ‘variable cost’. These include variable costs such as labor wages, raw material purchase costs, electricity and fuel costs, running costs of machinery, etc. As production increases, variable costs increase, when production decreases, variable costs decrease, and when production activities are temporarily stopped, variable costs also cease. Therefore, the increase in the cost of a firm as the production decreases is called 'variable cost'.

image source
There are some differences between fixed cost and variable cost.
Fixed costs are never zero. Even if production activities are temporarily stopped, the firm has to bear a fixed cost. Conversely, variable costs can be zero. Variable costs are zero when a firm's production activities are temporarily closed.
In the short run a producer is mainly affected by variable costs. This is because, in the short run, if a producer sees that a portion of the total variable cost and fixed cost is rising from the price of the product, it will continue production even if it admits some loss rather than stop production. Conversely, in the long run any producer is affected by fixed costs. This is because the firm is forced to stop production if it is not possible to raise fixed costs in the long run. So, in the long run a firm’s production plan is largely influenced by fixed costs.