One kilometre is 0.6213711922 miles, because one mile is exactly 1.609344 kilometres. Both the long decimal and the oddly specific 1.609344 come from the same place: the mile was pinned to the metre through the inch, and the arithmetic simply is what it is.
About the units
The kilometre is a thousand metres, and it became the standard road-distance unit almost everywhere during the nineteenth and twentieth centuries. The mile is far older. It descends from the Roman mille passus, a thousand paces of two steps each, which was roughly 1,480 metres. The modern statute mile is longer, and its length was fixed by an English statute of 1593 that defined it as eight furlongs. That in turn is where the famous 5,280 feet comes from: a furlong is 660 feet, the length of a medieval ploughed field, and eight of them make the mile. The number looks arbitrary because it is a compromise between two older systems that had nothing to do with each other.
The exact factor
Since 1 mi = 1,609.344 m exactly, kilometres to miles is 1 ÷ 1.609344 = 0.62137119223733397..., a repeating decimal. The reverse terminates. The classic mental shortcut uses the Fibonacci sequence: consecutive Fibonacci numbers approximate the ratio, so 5 km is about 3 miles, 8 km about 5 miles, 13 km about 8 miles. The approximation is good to within about half a per cent because the golden ratio, 1.618, happens to sit very close to 1.609.
Where you meet this conversion
Road signs are the obvious case — the United States and the United Kingdom post distances and speed limits in miles while nearly everyone else uses kilometres, and rental cars crossing a border show the mismatch immediately. Running is the other big one: race distances are metric almost everywhere, so a marathon is 42.195 km, which converts to 26.219 miles, and the odd fraction in "26.2" is the metric distance showing through. Aviation and shipping use neither, preferring nautical miles.