They are going in straight lines in relation to the other particles in the object.  Then the force of one particle exerts on another particle as they get closer or further from each other, causing them to change direction.  This happens for innumerable numbers of particles, appearing like a singular object that is spinning, since the forces are too great to pull the object apart.  If you spin it fast enough, the particles will overcome the atomic forces holding it together, and the object will break apart, with the individual pieces continuing to move in a straight line.