Moldings are both functional and decorative. Though many moldings are installed to give a room distinctive style and detailing, they also serve a purpose: to hide the joints between walls and floors, ceilings, doors and windows.
Many different patterns and styles are made from a variety of both softwoods and hardwoods. These profiles can be used individually, and some are combined to create intricate patterns.
Moldings in older homes may be made of plaster (particularly cornice and crown moldings) or any of several hardwoods or softwoods. (Before you strip the paint from any older surfaces, find out whether the old paint contains lead-sanding or stripping such paint creates a toxic hazard.)
New moldings are sold at lumberyards and millwork shops, the best places to see the wide selection available. Hardwood moldings meant to be stained or finished naturally are relatively expensive; much less expensive are paint-grade pine or fir moldings made from short pieces that are "finger joined" together. You can also buy a range of ready-to-paint, highly-decorative moldings made from high-density polymers.
Most moldings are nailed in place with finishing nails; nailheads are set beneath the wood's surface and filled with spackling compound or, for moldings meant to be stained rather than painted, pigmented wood filler.
Basic profiles of moldings run the gamut from simple rectangles to intricate patterns. Many of these styles are combined with one another to form base moldings, ceiling moldings, casings, chair rails and other styles.

Ceiling moldings add a decorative element at the top of walls and provide a gentle transition from wall to ceiling. Depending upon a room's style, these may be a simple cove pattern or a highly-intricate crown molding.
A chair rail is commonly attached to a wall at a height of from 33 inches to 35 inches from the floor. It protects the wall from marring by chair backs and may provide a transiition from wainscotting at the base to the wall above.

Door and window casing covers the gap between wall and door or window jambs. Styles range from simple to intricate, built-up varieities.
Base and base-with-shoe styles hide the joint between wall and floor and protect the bottom of the wall from shoes, vacuum cleaners and the like.