Up until the 1600s or thereabouts, a lot of people didn't have surnames. It wasn't until a national census required them to have registered surnames that they were widely adopted. Many people took surnames that described their craft - Fisher, Farmer, Tanner, Tailor - or where they were from.
Others took derivatives of their father's name. This was particularly prevalent in Celtic regions - the prefixes Mc, Mac, O, and ap usually mean 'son of'.
Other surnames come from translations from other languages - for instance, Bashford is derived from the French surname De Basford.
There are numerous websites that detail the origins of surnames, generally available via genealogy searches.