Rifle bores have grooves and lands that spiral down the entire length of the barrel. These are what gives the bullet or projectile a spin. The spin stabilizes the bullet as it travels down the barrel, much like the way that a football spirals when thrown by a quarterback. The longer the barrel, the greater the accuracy due to more spin on the projectile.
Photo Credit: HUNTERcourse.com