When the sport was first played, it was played by upper class Brits, and they called it 'soccer'. The name 'football' only started being used, about 18 years later, when the lower classes started playing it. They didn't want to call it the same name as the wealthy, so they came up with the name 'football'.
So although, Football is used more commonly worldwide, the word 'soccer' actually came first.