What causes parts of Earth's crust and mantle to be vaporized and ejected into a space?

A big huge impact with another body - planet, moon, asteroid, etc. Possibly a big enough volcano would eject material into space, but it would not be able to break free of gravity and would instead come raining back down sooner or later. Oh, and you're gonna love this.... The big meteorite, asteroid or comet impact sounds like a candidate. Same with the volcano. No doubt about the planetary collision scenario. But consider that some nuclear tests have thrown material out away from earth far enough for it to be swept away by the solar wind.