That's generally what fences are for.
Racing cars is extremely dangerous. There is obviously a fair amount of danger for drivers, but even for spectators crashes can turn pretty grizzly. Most tracks learned to be more careful after the 1955 Le Mans disaster, but as you'll see in this video, sometimes smaller drag strips don't take the same precautions against flying debris. Luckily, the cameraman hit by a flying door in this video escaped with only a graze, both him and his tripod, but it could have easily been different.
Be careful out there, kids. Sometimes people crash.