Hi there.
Ditches are cheaper than fences or walls, they drain water away and you can throw rubbish in them.
All you need is digging sticks and away you go, dig the ditch and use the soil from it to build an embankment, stops people getting in at you easily and keeps the animals in.
Cheers, Steve.