Pry up the bottom edge of the siding that is in place above the ledger board. With vinyl siding, you can use the curved siding removal tool to hook up under the edge of the vinyl siding. For other types of siding, you can either pry with your hands or use the claw of a hammer to help pull the siding up and out of the way. Remove any nails or screws as necessary to loosen the bottom row of siding.
Apply silicone caulking along the top edge of the ledger board as well as up on the wall under the bottom edge of the lowest piece of siding. Install the Z-flashing in the bed if you're using silicone caulking. Slide the top, vertical edge of the flashing up under the bottom row of siding, with the horizontal section resting on top of the ledger board and the other vertical section down over the face of the ledger board.
Reattach the siding according to the manner in which it was initially installed, either with nails or screws. After the siding is reattached, install your deck boards according to the manufacturer's installation instructions, based upon if you are working with composites, wood or vinyl. In all cases, the edge of the boards will rest on top of the flashing where they butt up against the house.