Devel::Cover leverages Perl's debugger hooks. Instead of stopping execution and giving you control (like the debugger), or counting the number of times you reached a statement (like Devel::NYTProf), Devel::Cover records all the places execution reached. Your test code gives you a particular place to put the code you'll be running to reach as much of your code as possible, but the fact that it runs tests is actually a side issue: what matters is how much of the program gets visited (your "coverage").
Any code you run with -MDevel::Cover is automatically added to the coverage database. This means that sometimes you have to get creative to have Devel::Cover only record coverage for your code, instead of also recording coverage for prove, all of the Test:: modules you use, and so on.