It depends on the jurisdiction. In some cases, you may need to get a permit or licence from the local council or other authority before installing a fence. In others, it may be sufficient to just notify your neighbours of your plans. It's always best to check with your local council or planning department to find out what the specific requirements are in your area.
You should always ask for permission before putting fences around someone else's property. It's not just common courtesy; it's also the law in many cases. If you put up a fence without first getting the owner's permission, you could be sued for trespassing. And even if you do have the owner's permission, there may be stipulations about where and how high the fence can be, what type of materials can be used, etc. So it's always best to check with the property owner before proceeding with any fencing project.