How are rifle barrels made?

I would guess that you get a piece of good steel and turn it on some kind of computerized metal lathe to get the shape you want, and then you drill a hole in it. Or maybe you drill the hole in the block of steel first. How do you get the riflings in? What about chrome lining, how is that done?

What is the difference in production for a cheap AK barrel versus a barrel for a $5000 sniper rifle?

Is a shotgun barrel with much thinner metal and a bigger bore made the same way?

Here is a website that may answer some of your questions.

http://www.riflebarrels.com/articles/barrel_making.htm

I’m pretty sure shotgun barrels are just bored-out steel tubes of more or less the correct diameter. My 870 isn’t mirror-smooth on the inside, and nor does it need to be, considering how a shotgun works.

Rifle barrels are a different story. Essentially all are machined to a uniform even rod, and then are bored out.

Where they differ is in how they put the rifling in the barrel. There are 3 main types:

Cut rifling, which is where the rifling is carved out of the barrel.

Button rifling, which is a cold-forming process where a tungsten carbide “button” is forced through the barrel, impressing the rifling into the bore.

Hammer forging, which is where the unbored barrel is placed over a “negative” mandrel, and then hammered in such a way that the rifling is impressed into the inside of the barrel.

http://www.lasc.us/RangingShotBarrelMakingFeature.htm

A precision rifle barrel is machined to high tolerances (a “match grade” barrel has end to end uniformity to within 0.0002”.), it will usually be machined out of one chunk of steel (including the receiver) with a larger than normal cross section, and various techniques may be used to reduce vibration and tension in the barrel, including how it attaches to the stock of the rifle (can’t have the stock putting pressure on the barrel).

That’s called a “Free Floating” barrel.

Was the concept of spinning something to make it fly truer known before it was applied to rifle projectiles?

Well, if you count slightly angled arrow fletching to make them spinning then it’s older than dirt.

I don’t know if thrown spears or javelins ever had spin imparted, but thrown projectiles have been around since before recorded time.

I would think that someone, somewhere and somewhen, would have noticed that imparting spin helped with accuracy.