A fence is a usually wooden or metal structure that encloses a yard, pasture, or other area. Many people with back yard swimming pools put fences around them to make sure small children don't fall in.
The difference between a fence and a wall is that you can almost always see through a fence, at least to some degree, while a wall is solid. You can use fence as a verb too: "I think I'll fence my yard in, because my chickens keep wandering off." If someone calls you a fence, though, they mean you're selling stolen goods, and if you fence professionally, you participate in the sword fighting sport of fencing.