A mile is distantly based on an old Roman unit, the Roman mile, which was 1000 paces. This was 5000 Roman feet, but England placed more importance on the furlong and so the statute mile in England was redefined in 1593 to be 8 furlongs, or 5280 feet. This gives us the modern day US survey mile.
A nautical mile was based on latitude to make life easier for sailors. 1 minute of latitude is 1 nautical mile. It just happens to be a very similar distance to the survey mile.
This is also where knots come from. 1 nmi/h is 1 knot.
Latest Answers