The difference between a floating barrel and a fixed barrel is that a floating barrel does not touch any part of the rifle besides the receiver, while a fixed barrel rests firmly against the stock. Floating barrels usually provide more accuracy in target shooting, but the precision of some very lightweight rifles suffers if the barrels are not fixed.
Floating barrels increase accuracy. When a bullet is fired through the metal barrel, the barrel vibrates and heats up, causing the metal to expand. When the metal expands evenly, the bullet flies straight through the barrel and accurately towards the target.
However, if some external force puts pressure on the barrel, it expands unevenly. This causes the bullet to veer off in the wrong direction. In a traditional fixed barrel rifle, the wooden stock may warp due to heat or humidity. This is common if the rifle is used outdoors. The warped stock presses against the barrel and prevents the bullet from flying straight. This problem is avoided when the barrel floats free of the stock.
However, lightweight rifles often need the support of an attached stock, as they are prone to vibrate too wildly when a bullet is fired. For this reason, they are usually manufactured with fixed barrels.