Straw is the stems of cereals after the grain has been removed. Hay is wild(ish) grasses and herbs, generally cut while green
Straw is good for bedding animals, mulching, composting, making rope etc. As mulch it will last quite a long time, because of its high
carbon:nitrogen ratio
Hay is mostly good for feeding to animals. You can mulch with it, but, as I've said before, IMO making it purely for that purpose is not a good use of
land, time,
energy etc. It rots fast, so if you want to use it as a weed barrier, you have to use a lot and keep adding it as fast as it decays. In composting terms, hay is "green" (rich in nutrients such as nitrogen) whereas straw is brown (mostly cellulose, that is carbon, dry and full of air). However the later you cut hay, the browner it gets. Dry stalks of weeds cut in winter after the seeds have dropped can be used as a substitute for straw, although technically it's hay. In the past, some hay used to be cut extremely late in some places (probably partly due to the time involved in cutting large areas by hand, but also, I suspect, due to currently unfashionable animals such as donkeys, which will tolerate poorer hay).
Animals can and do eat straw, especially ruminants who can digest the cellulose. It is often added to the
feed of animals. I tried to bed my goats and donkey with rye straw, but it was obvious to me that they prefered to eat it, at least in winter time. Australian farmers feed cows on shredded
newspaper when grass is short during droughts. Wheat straw is generally regarded as poor feed, but oat straw is said to be fairly good animal feed. Generally hay is better feed than straw, but good clean, dry straw can be better feed than bad hay.
In other words, straw and hay are different things, but there is some overlap in their function and properties.