At that point whoever did it or whoever was in the vicinity of it is cursed. At least they weren't until someone dug up something they owned or disturbed their remains. The other slightly less common version has the spirits of the dead not bothered by new construction (after all, people have to live somewhere).
Sometimes this isn't known or revealed until the end, sometimes it's known only to the greedy land developer who just doesn't care as long as he gets it cheap, or to people who don't believe in such nonsense but will by the end of the movie.
The disturbed spirits of the ancients of the land then enact their bloody vengeance against those who wake them by turning off the lights, making hooting noises, creating flies and maybe, if they feel up to it despite being dead, killing people. common explanation for supernatural goings-on in the United States, most commonly seen in movies coming in two common varieties: A Haunted House is built on an ancient Indian burial ground.