torsional strain comes from repulsion between bonding electrons in orbitals of carbon bonds
this is the strain that arises from overlap of methyl or other substituent groups on the carbon. these can be quite large and the electrons in the bonds will repel each other
carbon in a linear chain can take up an eclipsed or staggered conformation. if you look down the carbon bond in the eclipsed conformation then you will only be able to see 3 groups as they are parallel.

eclipsed conformation
the eclipsed conformation is higher energy than the staggered conformation as the groups are further apart and naturally repel. this lead to the molecule experiencing strain.

staggered conformation
by looking down the bond we can create what is called a newman projection which shows the conformation of an organic molecule. the angle between the groups on the front and back carbon is called the dihedral angle and is 60˚ for the staggered conformation and 0˚ for the eclipsed conformation

a bond can only have 2 levels of torsional strain, a higher state for each eclipsed confirmation, and a lower for the staggered conformations. the gap between the energy state of the conformation determines the rate of rotation around the bond. if the energy difference is low such as in ethane then ambient room temp is more than enough to provide energy for many rotations a second.
butane is a little more complicated because each of the carbons have 2 different groups around them. these different groups create 2 eclipsed conformations and and two staggered conformation.
Syn-periplanar
this is when the 2 methyl groups are in front of each other. this creates both steric strain (from the 2 large $\ce{CH3}$ being eclipsed) and torsional strain (from the bonds being eclipsed in general
Anticlinal
anticlinal is when the larger methyl groups do not lie in parallel. this means that anticlinal conformation is less energetic than synperiplanar. there is still steric strain but much less as it is between a methyl and a hydrogen. torsional strain is still present from the eclipsed conformation

Synclinal/ gauche
a synclinal conformation is when the methyl groups are next to each other in a staggered conformation. this reduces strain compared to syn-periplanar as they are not parallel but steric strain still exists due to the proximity of the large groups to each other. the torsional strain is no more as this is a staggered conformation
Anti-periplanar
anti periplanar is the most stable conformation as the large groups are as far away from each other as possible and in a staggered conformation
the fact that antiperiplanar is the most stable conformation means that long carbon chains will take up at zigzag structure to achieve the most stable conformation.
