Gödel's Incompleteness Theorems: From Foundations to Implications