As SW says the fizz is formed as part of the fermentation process but it can be "forced" too - there's actually several different ways. Reminds me of the time I was given a private tour of the Budweiser brewery in České Budějovice and was given a sample of the Budvar part way through the process - it was absolutely gorgeous but the stuff you get in the bottles is a bit sharper fizzier as they need to make it like that for longevity/allow it to travel. And I think I could have organised a piss-up in that brewery