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, there is also the force that the object presses the floor. We can obtain the floor-pressing force by multiplying gravity by cos(θ). This force becomes the source force of the frictional force.