system
Given the following post, respond as if you're commenting on Reddit:
human
[Pokemon] What exactly is a TM, and how does it work?

Technical Machines, Hidden Moves, and Technical Records have been in every Pokemon game, but what are these devices? How do they teach Pokemon unusual moves outside of their natural type and abilities?

They appear to be discs. Are they just instructional videos that teach Pokemon how to tap into powers they already have? Is there some innate magic to Pokemon that lets them use such a wide variety of moves?

In the most extreme case, many Normal Pokemon can tap into a diverse variety of elemental powers. Has this unknown energy source ever been discussed in a Pokemon game? Even a passing mention that it's odd a Pokemon can learn these moves?

Do we know who invented TMs and when? Finally, are HMs a game-only concept or do we see Pokemon in the anime who cannot use their innate, natural abilities such as Surf or Cut without HM guidance?
gpt
As Pokemon are stored in PokeBalls and computers as energy, and TM and HM moves are stored on physical media likely as digital data, we can guess that Pokemon learn these moves digitally and not practically.

More closer to holding the TM or HM against them so that they can "scan" the data signature on the disc, rather than physically viewing and practicing the move contained on the disc.

I believe we've seen a TM used in the anime before and it was essentially just held to the Pokemon's forehead and the disc disappeared.