The first step is to discuss the issue with the owner of the wall/fence, pointing out that it is dangerous and try to agree (and make note of) a solution – your neighbour may not be aware the wall or fence is dangerous.
If they don’t repair it, you can report a dangerous building or structure to your council <link here>
Note: If it is not your wall, you cannot repair it, paint it, or fix anything to the wall without the owners consent. Care should be taken about doing (or agreeing to) repairing the neighbour’s dangerous structure – if something happens you may be in a difficult situation. One possible workaround is to erect a wall/fence on your land alongside the existing wall/fence but this sometimes neither practical or cheap!
Still not answered your question? We love questions so fire it at us using the contact details here