The Hay Wall is the most basic form of a Wall. It functions just as one might suspect by keeping things on one side or the other. Because there's no "gate" construction item at the moment, it is impossible to form a perfectly impenetrable wall without having to use a Hammer to get past it yourself.
Hay Walls are relatively weak with only 50 Health to start out with and are susceptible to fire. Adding more Grass or another piece of wall will allow you to upgrade the wall segment one time. This will give the wall 100 Health but it will still be flamable. For this reason, use caution.