For a while in the 1970s and 1980s, Lionel used DC power in its least expensive O27 electric train sets. They stopped this practice in the mid 1980s, but there are still plenty of those sets kicking around in basements or attics and on the secondary market. They tend to be very inexpensive, especially compared to new sets on the market today.
Here’s how to figure out what you have, and track down a suitable replacement. AC and DC power supplies are not interchangeable, and you can seriously damage your train if you use the wrong kind. Trying to run a DC train on AC results in a train that won’t move and makes a ton of noise.
Often, the transformer will say whether it outputs AC or DC. That’s your first clue. If the device actually says “transformer” on it, chances are it’s AC. Most train manufacturers, including Lionel, refer to their DC counterparts as “power packs” or some other similar terminology.
If you have a DC power pack, and you’re sure it’s dead, you can replace it with any DC power pack intended for HO scale trains. The power packs supplied by Lionel weren’t anything special–if they even said “Lionel” on them, someone else made them and put the Lionel name on them. Often Lionel didn’t even bother, just packaging someone else’s product along with their trains. This Model Power unit is one example that I was able to find quickly online. Most hobby shops that deal in trains will have a selection of them, and some even have used ones. Used HO power packs tend to be very inexpensive, sometimes selling for as little as $5.
If you prefer to make your locomotive compatible with traditional (as well as newer) Lionel so you can use a traditional AC transformer, you can convert it to AC using these instructions, courtesy of Lionel itself. There’s no modification necessary to the track or the cars.