There are two kinds, the underground fence you cannot make at home, that is a collar and wire device. Then you have a hot wire that you can do yourself.
My question is what are you trying to prevent them from doing? both have limitations on how you use them.