frictional force is a macroscopic effect of atomic size electromagnetic forses.
It usually causes the decreasion of the velocity and because of being a nonconservative force, has a path dependent integral. (I mean the work) and decreases the total energy of the body