Lionel for decades made both "O" and "O27" tinplate track. O track had a 31" diameter curve and had taller rails and thicker ties. O27 track is 27" diameter curves, but the rails and ties are lower. This means you can't mix-and-match, you need to use one or the other.
In some cases, Lionel made two versions of the same engine, one for O and one for O27 curves. IIRC the O versions used a three-digit number, O27 used four-digit numbers. An O27 engine can run on O gauge track, but an O gauge engine generally can't take the tighter O27 curve. If the layout uses larger curves, like Fastrack O36 curves, either engine will work fine on it.
(I use the past tense because I believe Lionel announced a couple years ago that they were only going to be making "Fastrack" going forward, and not do the traditional tinplate track anymore.)
To add to the potential confusion, in the late 1970s K-Line began making Lionel-compatable O and O27 track sections, but in both original and wider curves. So you could build an "O72" layout (O gauge, 72" diameter curves) using either O or O27 style track. O42 became particularly popular because it was the broadest curve you could fit on a 4' x 8' sheet of plywood.
Marx also made O27 track. Marx made O27 track in a 34" diameter as well as 27". Marx switches can handle deeper and thicker flanges than most of the Lionel O27 and O switches. The earlier Marx tinplate equipment will not go through the Lionel switches easily because of the thicker and deeper flanges.
O27 track can be mixed with O style track with little difficulty. It requires opening the O27 rail slightly to accommodate the larger O track pins, and acceptance of ramps between the 2 track levels.
The difference between O and O27 gauge track:https://www.youtube.com/watch?v=1fOijtn7Cu8https://www.youtube.com/watch?v=x5w4qcfxWkU