What effect does rifleing in the barrel of a gun have?

It makes the bullet spin when it is fired- much the same way a football spins in flight. The helps the bullet travel in a straight line, improving the accuracy of the gun.