That's called Reachability. It enables you to pull the active screen area downwards so that you can reach items at the top with just one hand.
You can turn it off in settings if it becomes annoying.
Settings -> Accessibility -> Touch
On iPhones with a home button it is invoked by a double tap on the home button. On iPhones without a home button it's invoked by swiping down on the 'home bar'.