Plants and other living organisms naturally possess a special ability to emit chemicals known as semiochemicals as a way to defend themselves from predators.
(For example, the smell of the lawn fertilizer Milorganite is claimed to make it an effective repellent.)
A simple electrified or barbed-wire fence can mechanically repel livestock or predator animals.
High-frequency whistles are used on vehicles to drive deer away from highways, and similar devices are used to deter certain types of insects or rodents.
Repellents of this kind for domestic cats and dogs include ultrasonic devices which emit a high-frequency noise that does not affect humans.
It can be difficult to design a repellent method that drives away only undesirable animals while having no effect on people or other creatures.