Few things discourage a hosta gardener more than having a herd of deer show up in early summer and mow off all of their hostas like a giant out-of-control lawnmower. They are big animals that can eat a lot and they aren't afraid of people. They are fairly smart and once they have a taste for hostas they will keep coming back.
     Fences are the most effective, followed by a dog that will chase them off. They can be fooled by scent-based deterrents temporarily, but they will eventually figure them out, or less gullible ones will come along that are more up on the latest human tricks. Varying these deterrents is more effective than just using the same one. Much better control can be had by using a spray with capsaicin - the chemical that makes hot peppers hot. The hotter the spray the better it works. Extremely hot sauces are available now for very little money. If using them be careful to avoid skin contact and wear eye protection and a mask to keep from breathing the spray. Do not set the sprayer to a mist.
     Groundhogs and Rabbits can also take a liking to hosta foliage. While deer eat only the leaves and don't eat the petioles, groundhogs eat the petioles too. Rabbits sometimes eat leaves, and other times just cut them off and leave them on the ground. Rabbits cut petioles cleanly, while deer rip and tear. 

In the Garden: Taste deterrents made with capsaicin (hot pepper) are the most effective on deer, the hotter the better. Moth flakes (not balls) made with naphthalene are EPA-approved in the US and generally safe around pets and wildlife, and are very effective at deterring rabbits. Groundhogs are best removed.