Molecular dynamics simulation of friction phenomena at the atomic scale