The first pieces to come off a wall are the last pieces to be reinstalled -- the moldings and other pieces of trim. It can be worthwhile to remove them carefully for reuse, especially when dealing with the ornate woodwork found in older homes. Matching new replacements to old woodwork can be expensive.
The challenge is to remove the moldings without damaging them or anything else that will remain. Work slowly and methodically, prying the pieces loose from the nails that hold them.
Nails present two problems. First, if the molding has been painted, the nails are probably concealed. Second, even if you know where the nails are, you won't be able to get at them because their heads are set beneath the surface of the molding. There are two solutions: You can pry the molding away from the wall and pull out the nails from the back or cut them off, or you can drive the nails through the molding. Don't try to back the nails out; their heads likely will chip the face of the molding as they are driven out.
About 10 to 15 minutes per piece of molding, depending on length
Putty knife, 3-inch drywall knife, flat bar, hammer, nail set, end nips, file
Prying, driving nails, cutting nails, filing
The small heads of most finishing nails pull easily through the back of molding, but sometimes, especially with older nails in hardwood molding, you can't pull nails without causing damage. In that case, clip off the nails with end nips and file away any protruding part of the nail until it is flush with the back of the molding.