If its says 027 it will run on 027 but only a handfull of Post War engines would not run on 027 including the 773 Hudson and FM Trainmasters. Many of the 031 and 027 engines were identical but had different cab numbers. 4 digit numbers came in 027 sets and 3 digit in 031 sets. Example 665 and 2065 Hudsons.
027 was designed for space constrained areas. Also 027 is a cost saver. Perfect for the home seasonal set up. I have seen larger layouts incorporate both. The GP 7s run on 027 but with some difficulty in the swivel of the trucks. The Tandem Lionel Id site states they were designed for 027 track hence their four digit number. Just the facts that they are used and old, their joints may not cooperate. I had to work on my BN to smooth the truck mating surfaces. Over time they do get grooved.
As others have said, it was the old version of "minimum curve" ratings, although many of the postwar O gauge locomotives were simply renumbered O-27 locomotives or visa versa. The F3's were marketed as O gauge engines for the most part but will run on O-27 curves although from what I understand the fuel tanks tend to bottom out on Lionel's O-27 switch mechanisms. That being said, it's all sort of dependent on the locomotive. Many will run on O-27 curves, several won't. All should run on "O gauge" O-31 track though if rated for such.
I have 3 lionel postwar engines from 50's and 60's. Two 2-4-2's and one 2-6-4, they all have no issue with my 027 switches.
My wife recently surprised me with the traditional polar Express loco from 2012ish and to make it work i had to remove the traction tires so the flanges would catch on the curves. After i did that i had no issues.
The Lionel 671 was listed as standard O using O gauge track with 31" diameter curves. The 2020 loco was listed as O-27.The only difference between the two locos is the number.
O-27 sets came with a transformer. O sets did not have a transformer. O track was advertised to be stronger than 0-27. It is stronger but is also more out of scale.
The O22 switches ( turnouts to non O tinplate fans ) for O 31 track are much better than the O-27 switches.
FWIW, not much, I had an uncle that was a track man for the full sized PRR for @ 50 years and ALWAYS called them switches.