Perfect competition is a market structure defined by several key assumptions: a large number of firms, identical (homogenous) products, no barriers to entry (free entry and exit), perfect information and perfect resource mobility. As a result of these conditions, no single firm has any significant market power and the market structure achieves allocative (and in the long run also productive) efficiency.
Although there is free entry and exit, in the short-run firms cannot enter or exit the market as it takes time to make the necessary adjustments within the business. As a result, economic profits or losses can exist in the short-run. In the long run however, firms can enter or exit the market based on the incentive of profit, affecting the market supply and thus lowering or raising the market price, respectively. As a result, of this, firms in the perfectly competitive market will always earn a normal profit in the long-run.