Both types of products will protect your paint against moisture, ozone and ultraviolet. Sealers, which are typically petroleum based and contain silicones, usually last much longer (up to a year or more) than ordinary wax. But the distinction between these two products is blurring because many waxes now contain silicone and other ingredients designed to extend protection.
A wax or sealer that is applied by rubbing it on your car's finish will always give you better protection than a product that's sprayed on at a car wash. Car wash waxes give a nice temporary shine, but don't provide lasting protection.
When choosing a wax or sealer, choose one that's "right" for your vehicle's finish. Most newer cars and trucks have what's called a "base coat, clear coat" finish. Over the base color coat of paint is a layer of clear paint to provide added shine and protection. Some car makes say it isn't really necessary to wax or seal a base coat, clear coat paint job. But it certainly isn't going to hurt anything -- provided you use a product that is designed for this type of finish.
CAUTION: Wax or sealer for a base coat, clear coat finish should contain no abrasives or polish. Abrasives are often added to wax to remove the oxidized layer from the surface of the paint. When the wax is applied, it has a polishing effect that helps shines up dull, faded paint. It works great on solid color finishes, but not clear coated finishes because it scratches and dulls the clear coat.
APPLYING WAX & SEALER