TMCC is Lionel's first command-control system. It was superseded by Legacy, which built upon its predecessor with an expanded feature set. There is a measure of compatibility between the two, in that you can control TMCC locomotives using Legacy, and basic features of Legacy locomotives can be operated using a TMCC system. You'll need the full-blown Legacy system to reach all features of Legacy locomotives.
In either case, the control system is independent of the power supply feeding the track. Command-control is essentially a radio-controlled throttle placed in each locomotive, Each locomotive so equipped will draw from the same power supplied to itself and any other locomotive on the same track, but it will only react to control inputs specifically addressed to its unique ID number.
Lionel makes fixed-voltage transformers (PowerMaster, for command-only layouts) and variable-voltage transformers (from low-end CW units all the way up to an evolution of it's iconic ZW transformer called the ZW-L) that can be used to power your trains, whether conventional or TMCC/Legacy equipped. If you're certain you'll be sticking with the hobby long enough to have multiple trains running on a layout, getting the bigger transformers at the outset will save your having to upgrade from smaller units later on.
Specific to your question about the SD40-2, if you just need something low-end to get it running on your first loop of track before you even get a command-control system, the Lionel CW-80 (or most postwar-era Lionel transformers rated in the neighborhood of 100 or more watts) should be sufficient, but the advice about future expansion still applies.
---PCJ