Typically electric fences are used to contain livestock, but they can also be used to Protect Rabbits, Poultry, Dogs from Coyotes, Raccoons, Foxes and to keep Keep Pests out of the Garden, Flower Beds...

Low impedance chargers are the most common fence chargers manufactured today. They are much safer than their predecessors, the high impedance chargers that used an AC high voltage output.

A short high voltage low amperage short shock which will startle but not injure the animal or people.
People have been killed by faulty chargers that supplied too much amperage.

The work with a grounding rod in the ground and wire strands or netting above ground.

Typical Low Impedance System:

Pulse Rate 1 per second with
           a duration of 0.0003 seconds
Voltage    3,000 - 5,000 V
Amps       100–150 milliamps
Ground Rods:
The ground rod should be at least 30 away from other grounds, e.g. your electrical system, antennas, etc.
Steel pipe or rebar is better than copper. Copper can cause galvanic current which can effect the charger over time. The length depends on the type of soil. 7 feet is typical for large systems.
12-gauge wire is common

I have this one Happy Henhouse Charger $32

They also have a 15Joule one which would have been enough, but I couldn't find it online.

Output Energy 0.25J Joule - a measure of work (a force of one newton displaces a mass through a distance of one metre or the energy dissipated as heat when an electric current of one ampere passes through a resistance of one ohm for one second. )
No-load Voltage 6.7 kV
Voltage at 500Ω 3.5 kV
IP rating IP44 Ingress Protection or "IP" code evaluates the ability of a mechanical or electrical enclosure to resist the intrusion of dust, water, and accidental contact. see Electric Fence online
Links:
Considerations for Selecting & Installing an Electric Fence Charger
Electric Fence online