Friction decreases the kinetic energy which decreases the mechanical energy.
When two object moves one over the other, the resistance that is faced by the object is called as the friction. Any force that restricts the motion of any moving or any object that is sliding is called as friction. A kinetic energy can be considered as a non conservative energy that reduced the mechanical energy of any moving objects.
A friction can be considered as a force that resits motion of an object. When there a movement of two objects one against the other, there will be a conversion of kinetic energy into heat energy. This conversion is caused by the friction. Thus, the kinetic energy reduces the mechanical energy and they will be converted into heat energy.