It's used two ways AFAIK.
First is as in "best guess." E.g. in some opening or endgame "theory says" ____ is the best or _____ is a win/draw. We don't know for sure, but experts in that area (GMs) currently believe _____.
Second is as in "objectively true, but practically not." E.g. "this endgame is a theoretical win"... they may actually mean "it's a definite win, but very difficult to preform OTB" Queen vs Rook is a recently mentioned position in the forums that could fit this. Rook vs rook + a and c pawns would be another (a "theoretical draw" but in some cases, and for most players, unrealistically difficult to perform).
Oh, but if you hear someone say "They know a lot of theory" they're probably talking about openings.
I'll oftentimes hear chess commentators say that something is "all theory" or "all very theoretical" and am wondering what they mean by that? Thanks very much.