There are two aspects of the ending you're asking: one we can sort-of explain and one we can only make some reasoned speculation. (If you're still reading this, you will be spoiled...)
First, there's the whole question on how Superman can "die" in the first place. I think, to understand why people might believe this, don't forget that he's not the first Kryptonian to die in this universe: Zod was killed at the end of Man of Steel in a very similar situation.
We've seen Superman heal from a lot of serious damage, up to and including a targeted nuclear blast, but the key in all of those cases was that he was still alive when it happened. His extreme resistance to injury prevents him from, and his accelerated healing lets him survive almost any disease, damage or injury that he does suffer. But if something managed to break through his defenses and kill him, he can't come back from that.
When Clark snapped Zod's neck, he was able to do that because he was also Kryptonian, so Zod's bone and muscle strength was no help. And once his neck was snapped, he was dead, and couldn't come back. The same thing happened with Superman: Doomsday was already strong enough to injure him; combined with the green kryptonite Superman was wielding, Doomsday managed to inflict a fatal injury on him, and he died.
At least, that's the explanation that everyone seems to buy into. And if the movie had ended about 30 seconds earlier, it would explain everything. But, it didn't, which brings up the second part of your question:
What was that weird dirt jumping effect right at the end? It's never explained -- it's intentionally left unclear as a cliffhanger so we'll all want to watch Justice League and find out. However, the most reasonable explanation is that Clark was never really dead, just "mostly dead" and healing slowly. There's a few bits in the movie that we can use to back up this theory:
- When he was blasted with the nuke, it took several minutes for him to recover, during which time he was unconscious and seemingly dead.
- When he was exposed to Kypronite, even after the mineral was gone it took several minutes for his powers to return.
- In the Doomsday fight, he suffered far worse injuries around far more highly concentrated kryptonite.
- Clark relies on sunlight to heal himself, but he was take out of the sun and put in a box.
- If you listen closely enough during the final scenes with Bruce, Diana, and Lois, you can hear a very low thumping noise -- which I would later interpret as Clark starting to come awake and move around in his coffin.
In that case, the "bouncing dirt" effect is just a result of Clark, in his coffin, starting to stir and jostling the dirt around; presumably the shot cut off just before a fist punched through the coffin into the air around him. We will, presumably, find out in the sequel.
On a side note, it's hopefully entirely unrelated, but the mysteriously levitating stuff is a recurring visual element on The Flash whenever there's a whole lot of Speed Force going on in the area.