Why was there slavery?

there were countries in Europe (like Spain and other surrounding countries) who were exploring new lands and the last one that the europeans came across was Africa. and because of the skin color difference (which isn't because of anything other then our sun exposure!) they didn't really feel like those people were actually human. the Europeans had taken 10 people back to Europe and sold them to people to work for them.