Remove the old siding with a prybar or other tool to pull boards and nails off the wall. Inspect the sheathing to make sure it is solid, has no dampness or rot and is in good condition. Remove or drive in any protruding nails with a hammer. Replace part or all of the sheathing if necessary; most foam board insulation is installed over oriented strand board, or OSB, sheathing.
Choose a type of foam board: expanded polystyrene, or EPS, extruded polystyrene, or XPS, or polyisocyanurate. Base your choice on recommended R values for your area; the North American Insulation Manufacturers Association suggests R5 or R6 for most of the United States. Use XPS in most cases; it meets that requirement and is denser and more suited for exterior walls.
Cover the wall sheathing with a waterproof membrane, such as a polystyrene house wrap. Staple it to the sheathing with a construction stapler. Seal seams with tape from the membrane manufacturer. Tape wall edges, corners, windows, doors and other openings also to seal the sheathing from moisture.
Snap a level chalk line about an inch above the bottom of the sheathing all the way around the house. Use a line level on the chalk line or use a tape measure to mark distances on the wall to make a level line. Place the first panel vertically at a wall corner, with the panel bottom on the level line; use a straight board along the side of the corner to keep it straight vertically.
Secure that panel with galvanized shingle nails with 3/8-inch heads. Drive them through the sheathing into the wall studs but keep the nail heads flush with the surface of the foam board. Don't drive nails into the foam or dent it. Cover all the walls with foam board, one wall at a time, and use a utility knife, drywall saw or reciprocal saw to cut out openings for windows and doors.
Tape all foam board seams with a tape recommended by the manufacturer; it usually will be supplied with the material. Cover nail heads with tape and tape around the insides of door, window and other openings so the entire surface is sealed.
Install the new siding of choice. Nail fiber cement or wood siding to wall studs through the foam board. Nail mounting strips through the foam board for vinyl siding, which snaps into locking strips at the bottom and is nailed at the top. Use nails long enough to penetrate the foam, which may be 1 1/2 to 2 inches thick, the sheathing and into the studs.