>>984378This. A horse will roll to try and relieve the symptoms of colic, though there is a danger of gut twists if they roll too much.
For the most part, though, it's just a way of them scratching the itches they can't reach/rubbing off their sweat/getting rid of parasites.