To use a leash, simply right click the chosen dog. To unleash your dog, hold shift and right click with a free hand.
The leash allows you to lead around your dog. However, you cannot tie a dog up using a leash.
Download Link Edit
Crafting Recipe Edit
To craft a leash you will need 6 string.