Given the chance dogs will run all over the place without respecting boundaries. But thats not okay and you should not allow your neighbors dogs in your garden. The first step you should take if your neighbors dog consistently invades your garden is to have a friendly conversation with your neighbor.
If this does not solve your problem you may need to build a fence if you do not already have one. You may need to strengthen your wall as well.
A dog that runs around without its owner is considered "at large." In this case animal welfare could impound it. The dog could also be seized but this has legal consequences since it is then considered to be in your care and becomes your responsibility. The owner of a dog who is not contained could be fined and the fine would increase with every subsequent offense. You may be able to give your neighbor a wake-up call if you report them to the authorities but that would sour neighborly relations.