the recursion theorem
Here is something that sounds impossible: a program that prints its own source code, or more generally, a machine that can obtain a copy of its own complete description and then compute with it. You might object that this would need infinite nesting, the code containing the code containing the code. The recursion theorem says no infinite regress is needed; such self-reference is always achievable. Any computation you can describe that uses 'my own description' as if it were a given input can, in fact, be built.
Stated carefully: for any Turing machine T that takes two inputs, its own would-be description and a normal input, there exists a machine R such that R on input w behaves exactly like T running on (description of R, w). In words, R can act as though its own source code were handed to it for free. The construction is a clean trick: you build a part that produces a description of the whole, using a 'compute-then-combine' move (closely related to how a quine prints itself), so the machine reconstructs its own text from the inside without circular regress. The theorem guarantees the fixed point exists; you do not have to find it by magic.
The recursion theorem matters in two ways. First, it is a slick alternative route to undecidability. To prove A_TM undecidable without diagonalization, suppose a decider H for A_TM existed; build a machine R that obtains its own description, asks H whether R accepts its input, and then does the opposite of H's verdict. R now contradicts H on its own behavior, so H cannot exist. This is the liar paradox made into a program: 'this sentence is false' becomes 'this machine accepts exactly when it does not'. Second, it is a deep, genuinely surprising statement about self-reference, formalizing computational self-reproduction (the principle behind quines and, by analogy, behind self-copying programs) and undergirding results across logic, including Godel's incompleteness theorem, which is the same self-reference trick inside arithmetic.
Use the recursion theorem to re-prove A_TM undecidable. Assume decider H exists. Build R: R obtains its own description <R>, then for input w computes H(<R>, w) and ACCEPTS w iff H says R does NOT accept w. Then R accepts w exactly when it does not, a contradiction. So no such H exists, and A_TM is undecidable.
A machine that obtains its own code and contradicts any supposed decider: the liar paradox as a program.
The recursion theorem does NOT let a machine escape its own limits or 'know everything about itself'. It only guarantees a machine can access its own description; using that description to decide undecidable facts about itself still fails, which is exactly what the contradiction proofs exploit.