Wheel alignments are a part of standard vehicle maintenance that consists of adjusting the angles of the wheels so that they are set to the car maker's specification. The purpose of these adjustments is to reduce tire wear, and to ensure that vehicle travel is straight and true (without "pulling" to one side). In the same fashion that you will wear out your shoes if you walk only on the inside or outside edge, so your tires may become worn if not within allowed specifications.
Under normal driving conditions many vehicles can go 50 000 km+ before they need a new set of tires which is a good interval to have the alignment checked as well. Any severe driving incidents, or changed suspension components would also warrant a check.
The typical alignment on an economy sedan takes about an hour under ideal circumstances. A utility or performance vehicle may require additional labor. When fasteners and hardware are rusted/seized, extra time may be required and/or parts may need to be replaced. If your vehicle squeals while turning corners on dry pavement, it is probably time to have your alignment checked. Changing rims and tires will normally not affect the alignment but will affect secondary angles.