A Perfectly Competitive market is characterized by:
1) No exit or entry barriers
2) Totally homogeneous product
3) Eventually rising average cost of production
4) Suppliers and Consumers that are "price-takers", namely no individual action has any effect on the market price. This is rationalized by assuming that each producer and each consumer are "small" (as regards quantities) relative to the whole market.
If barriers existed firms could end up making pure economic profits. If product differentiation existed, each differentiated producer would face a downward slopping demand curve, i.e he would have some degree of monopolistic power. If average cost is eventually falling (doesn't happen very often though), the market will tend to become a "natural monopoly".
But the fourth property is the central one: in the real world there are always some barriers to entry/exit, and there is always some product differentiation, even if only in a broad sense. But as long as the market participants are small and with no visible monopoly/monopsony power (other than the little one offered through "inherent" product differentiation), the market will behave very much alike its theoretical ideal.