Friction at the atomic level