Code coverage metrics measure how much of your code runs when you run tests. The process starts by writing code and tests, then running those tests. As tests run, coverage tools record which lines and functions execute. After tests finish, coverage data is collected and analyzed to see what percent of code was covered. If coverage is low, you can add more tests to cover missing parts. Coverage helps find untested code but does not guarantee correctness. The example shows a simple function add(a, b) tested by calling it once. Coverage data tracks entering the function, executing the return line, and exiting. The final report shows 100% coverage because all lines ran. If some lines never run, coverage shows less than 100%, indicating tests missed those parts. This helps improve test quality and software reliability.