A North Korean spy satellite crashed into the sea after its unsuccessful launch, causing alerts to be issued in neighbouring Japan and South Korea.