Accurate treatment of the variational problem of wetting a composite surface clarifies the physical character of wetting. It is shown that only the area adjacent to a triple line exerts an influence on the apparent contact angle. This conclusion is true for flat composite surfaces and also for rough surfaces governed by Cassie and Wenzel wetting regimes. A surface density of defects in the vicinity of the triple line dictates the apparent contact angle.