Newton's First Law of Motion states: "Every object in a state of uniform motion tends to remain in that state of motion unless an external force is applied to it. "
In the space, there is no air and nothing is there to resist the motion of the object. However, the object may be subject to the tension of the other objects (such as other planets in the space) which may alter the orbit of the object.
If the object is moving in a vaccum container on the surface of the earth, the object is subject to the gravity force though its motion is not resisted by air.