TypeScript is a programming language that builds on JavaScript by adding types. You write code with types, like specifying a variable must be a string. TypeScript checks these types before running the code to catch mistakes early. Then, it compiles the code into plain JavaScript, which can run in any browser or Node.js environment. For example, a function greet takes a string name and returns a greeting. When you call greet("Alice"), TypeScript ensures "Alice" is a string, then the function returns "Hello, Alice!". The types are removed during compilation, so the final JavaScript runs normally. This process helps programmers avoid bugs and write clearer code.