Unit tests verify small pieces of code by invoking a unit of code and checking assumptions, while integration tests verify larger pieces of code by testing interactions between units and dependencies. Good unit tests are automated, repeatable, isolated, and fail when expected behavior changes. Test-driven development involves writing tests before code to specify and drive code implementation.