Regular, 1-high fences are fine for keeping animals on this side or that side, IN MOST CONDITIONS.
The exceptions are:
1) Putting a raised block next to the fence. If you've got your fence, and there's a raised block on one side, animals can go over the fence from that side. This is useful sometimes, because you can make a fenced pen and then drive goats and stuff into it.
2) Snow. Snow can pile up so that animals can climb on the snow, and then walk over the fence.
3) Bears. Bears can *reach* over a 1-high fence to strike animals on the other side, even if they can't get to them.
Cases #2 and 3 can both be prevented by using 2-high fence.
I have never seen animals "glitch" through a fence.