TDD is a development process where tests are written before code to improve software quality. It has two levels: acceptance TDD which writes tests for requirements and developer TDD which writes unit tests for detailed design. The goals of TDD are to have confidence in changes through frequent testing, reduce bugs in final delivery, and produce well-designed code. Problems can occur if requirements change and tests are not maintained, or if programmers think TDD wastes time rather than preventing bugs long-term.