The legislation dealing with party walls and associated matters is the Party Wall etc. Act 1996. This governs the rights and obligations of those intending to do work to party walls/structures, and/or, underpinning thereof, adjacent excavations and/or foundations (including piled foundations).
If you are thinking of extending or remodelling your home or commercial premises you could be under a legal obligation to serve notice of your intentions on the adjoining owner and then follow the procedure set down in the Act.
This is a statutory requirement which, when followed, gives an owner the right to carry out building work close to and sometimes on the boundary line but also protects the interests of the adjoining owner by endeavouring to safeguard the integrity of his or her property.