Some species prefer to settle high on the shore beyond the reach of most marine predators such as sea stars and snails, and where competition for space and food is not so intense. These species must be able to live out of water for long periods of time while the tide is out. Other species cannot tolerate long dry periods and live closer to the low tide line or in deeper water where they are not exposed at low tide. Gluing yourself to one spot for your entire adult life has its share of problems. Since you can't move around to collect food, you must be in a place where food comes to you regularly.
Adults give off chemicals to assist the larvae in their search for the perfect home.
As for reproduction, settling beside a member of the opposite sex is guaranteed for most species, because they are hermaphrodites, possessing both male and female sex organs. There are hundreds of different kinds of barnacles, from giant subtidal Acorn Barnacles to barnacles that live only on a specific species of whale. There are shell-less parasitic barnacles that fool female crabs into thinking they are a clutch of eggs to be cleaned and protected, and pelagic barnacles that grow only on floating objects far from shore. The lifestyles and appearance of barnacles are diverse and fascinating. So the next time you're walking along a rocky shore, watch where you step.