How a firm makes its profit in perfect competition under this condition?

Since:
Total cost=Fixed cost +Variable cost.
Variable cost depends on the number of labors employed and raw material used for production. Marginal cost is a component of Total cost.
Under perfect competition MC=Price of good. If this is true, how firms make profit for itself?
0