Motion is a crucial concept in the study of physics, and so it is important for Descartes to prove that motion is a mode of extension. If motion were not a way of being extended, then the entire study of physics could not really be deduced from the principles of geometry.

Descartes, therefore, denies the common understanding of motion as an action by which bodies transfer place. Motion, Descartes objects, is not anything outside of bodies themselves. Motion is just a function of the relative position of bodies. To be in motion, according to Descartes, is to transfer from one group of (contiguous) bodies (considered at rest) to another group of bodies.
The "contiguous" is important because it keeps motion from being entirely relative. Obviously, every body is transferring its position with regard to some things, and not with regard to other things, at every moment. If you are sitting still in your chair right now, you are not in motion relative to your chair or to the objects in your room, but you are in motion relative to other planets, since the earth itself in spinning.

In order to allow us to say absolutely that something is at rest or in motion, Descartes adds in the “contiguous.” The motion of a body, strictly speaking, is determined only in relation to those bodies with which it shares a common surface. When you are sitting still in your chair, then, you are not in motion, because you only share a common surface with the chair, not with heavenly bodies.

The “considered at rest” is important for a similar reason. Really, since motion is just the transfer of position relative to contiguous bodies, A cannot move away from B without B also moving away from A. They are both changing position relative to each other. This would all be well and good, if it were not for the fact that the Church did not want anyone claiming that the earth moved. Certainly, many contiguous bodies move relative to the earth (e.g., atmospheric particles). If a B must move in order for any A to move, the earth itself must move. Therefore, Descartes added in the "considered at rest." Though in reality B must move if A moves, when inquiring into the motion of A we consider B as not moving.