Rifling in the Rifle Bore
The bore of a rifle is grooved, which puts a spiral spin on the bullet for greater accuracy.
Rifling forces the bullet to spin, which allows it to travel straighter. The rifling is circular in the barrel, which causes the spin. The rate of spin is called twist. The smaller the twist rate, the more the bullet spins, which again allows it to travel straighter.
The length of a rifle barrel will affect the length of time the bullet travels straight after leaving the barrel. A longer barrel will normally allow the bullet to travel straighter further than a shorter barrel (assuming the same bullets are used). Keeping your rifle clean will also help your bullets travel where you aim them to go.