Gravity acts on all objects. Suppose an object is placed on an inclined plane. This object is subjected to a force that slips downward by gravity. If the slope is θ, then the magnitude of this force is the product of gravity multiplied by sin(θ).
On the other hand, in addition to the force with which the object slides, there is also the force that the object presses the floor. This force is obtained by multiplying gravity by cos(θ). This force becomes the source force of the frictional force.