fence because someone usually does not see it. then, if a person or animal does not know the fence is there, that person or animal bumps into it. then, they get a shock. then, they know not to cross that line. most people know how to climb over it though. the main use is to block farm animals from entering another persons pasture.
a more modern of the electric fence is a fence that actually is invisible. it serves a similar purpose, and has the same affect on a person or animal as the electric fence. the only difference is that it is literally invisible. a variation of this type of 