Any movement that happens whilst your shutter is open will be captured on your sensor and will show as motion blur. The faster the object moves the more blur it will show, and slower shutter speeds also show more blur.
The easiest way to control shutter speed is to put your camera in S or Tv mode. You can then decide on the shutter speed and the camera will take care of the other settings to correctly expose the image.
In this photo a shutter speed of 1/10s was used and the camera was held still. The bus moved a few metres in 1/10 of a second so this motion is shown as blur. The buildings in the background did not move and neither did the camera, so the buildings are sharp.
In this photo we moved the camera to keep the cyclist at the same position in the frame. She remains sharp and it is the background that shows motion blur due to the movement of the camera. A shutter speed of 1/40s was used. This technique is called panning.