Boxing in is straightforward carpentry. The part that goes wrong is burying something that later needs reaching, or covering something that needs air.
What must stay accessible
Stopcocks and isolating valves. These are needed in an emergency, and a valve behind a screwed and tiled panel is useless.
Traps and waste connections. These block and leak.
Compression joints and any connection. Ideally avoid boxing over joints at all; where unavoidable, provide access.
Water meters and gas meters. These must remain readable and accessible for the supplier.
Electrical connections and junction boxes. Accessible unless of a maintenance-free type.
Cistern valves behind a concealed cistern, through the flush plate aperture.
Ventilation
Some things must not be sealed in.
Gas meters and gas pipework require ventilation. Any enclosure has specific requirements, and this is a matter for a Gas Safe registered engineer rather than assumption. Never seal a gas meter into an airtight box.
Boilers and flues have clearance requirements set by the manufacturer.
Anything that could leak gas needs the enclosure to vent rather than accumulate.
If gas is involved in any way, take advice before boxing anything in.
Building the frame
Use planed timber of around 38 by 38mm, or 50 by 25mm for a shallow box.
Fix battens to the wall and the floor to form the frame, checking with a level and a square.
Leave clearance around the pipes. Pipes expand and contract, and a hot pipe in contact with timber ticks and creaks as it moves.
Allow at least 10mm all round, and use pipe clips with a rubber sleeve rather than letting pipes rest on timber.
Where a pipe passes through a batten, drill the hole oversize and line it with a sleeve or foam.
Insulate hot pipes inside the box, which reduces heat loss and noise.
Cladding
MDF is the usual choice: stable, smooth and paints well. Use moisture-resistant MDF in a bathroom or kitchen.
Plywood where strength matters or in a damp location.
Plasterboard where the box is to be plastered and tiled in, which gives the most integrated result.
Use 12mm or thicker for anything that will be leaned on or tiled.
Glue and screw to the frame, countersinking the heads.
Access panels
The part that decides whether the job was worth doing.
Proprietary access panels are neat, quick and available in many sizes, including tile-faced versions.
A removable section held with mirror screws, dome-headed screws with cups, or magnetic catches.
Make the opening generous enough to actually work through, not just to see through.
Position it where the valve or joint is, and remember you need to get a hand and a spanner in.
Do not silicone a removable panel in place, which defeats it entirely.
Label the panel discreetly on the inside so the next person knows what is behind it.
Finishing
Fill screw heads and joints, sand, prime and paint.
Scribe the box to an uneven wall or floor, or caulk the joint.
Return the skirting around the box, or run the box down to the floor and fit skirting to match.
Where the box is tiled, use a tile-faced access panel so the tiling continues across it.
Where boxing in is the wrong answer
Where the pipework is in poor condition, replace it before covering it.
Where there are joints that could be eliminated by running a continuous pipe, do that instead.
Where the pipe could be moved into the wall or floor properly, that is a better solution than a box in the room.
Making it look intentional
A box that runs the full height and full width of an alcove looks deliberate; one that stops halfway looks like a mistake being hidden.
Consider running the box the full length of a wall and using the top as a shelf or a window seat.
Match the depth to the skirting or the window reveal where you can, so the box lines up with something.
In a bathroom
Use moisture-resistant material and seal the joints, since a box in a bathroom gets wet.
Leave access to every valve and trap, and seal the box to the floor so that water cannot run underneath it.
Tile-faced access panels let the tiling run across the box without an obvious hatch.