Grass cracks are cracks at the bottom of a horse's hoof. Sand cracks are far worse - they actually start at the top, in what's called the coronet band.
These cracks are generally caused either by an injury to the coronet band (sometimes caused by a horse stepping on its own hoof), by poor angles of the leg or hoof, or by stress caused by riding - racehorses are very prone to getting these kinds of cracks. Poor shoeing can also cause them. Damage to the coronet band can cause a permanent crack that has to be held together artificially for the rest of the horse's life.
The treatment is to stabilize the crack until it heals - these days that's usually done by glueing synthetic material across the crack. More traditionally, the hoof would be pinned together with a metal band. If a conformation defect is involved, then special shoeing is indicated to correct the hoof angle.
A crack from the top of the hoof generally takes about a week of treatment before the horse can be ridden or worked.