How they do WHICH part? It's called a "Time Lapse" and there are plenty of YouTube videos on how to do that with your own camera. It's called a space shuttle. It's been in existence since the 60's.
The cost depends ... http://stason.org/TULARC/science-engineering/space/75-Space-shuttle-mission-costs.html