I was told keeping beer cold is not best for it's flavor. Is this true? How should I be storing it and for how long? Does it vary by style?
Def depends on style. IPAs should be stored cold and are better when fresh IMO. If you're aging stouts, barley's, etc. then a basement or cellar works great. I dont advise storing anything at room temp although many stores do this when products dont move. Dark and cool is key.
Definitely agree that IPAs should be cold and drank ASAP. As for cellaring, many beers made to keep for years have a cellaring temperature on the label (usually 55 degrees). However, I've generally stuck my stuff in a closet with no outside facing walls and been okay. In California there aren't really many basements and I don't want to drop the money for a fancy beer fridge that doesn't even store bottles upright. I've aged many beers for 3+ years using closets and haven't had any problems. I keep them upright in boxes I try to open as little as possible. If you have a basement then you should be good to go.
I've talked with a few brewers, and they've told me that cold is best for preservation, but for a stout or the like, they've told me to pour a glass, and let that glass get to room temp.
So in general for IPA's storing them cold is best we are saying. But for how long then before you think you start altering flavor? 2 months?
In the menu near the top of the page you'll see "Beers." Click on it and there will be a sub menu just below it. Click on beer 101 and you'll get a page of links. Find and click on the link that says how to store beer. Most of your questions will be answered there. Back up a bit and you'll find the word styles. Click on it. You'll get a psgr with names of some styles. Click on one like American IPA and look on the right hand side of the page, you'll find some info about storage and temps. Welcome to the site! Great resources here to be explored.
Anywhere from two hours to two months depending on a variety of things including the beer and the hops used and your personal tastes, which may change over time as well.