The meaning of cooked and overcooked depends a lot on personal taste, but generally al dente it's when it's still elastic but not mushy, like if you apply pressure with the border of a fork, it goes back to the original shape when you relieve the pressure and doesn't fall apart.
But that's simply the help visualize it and it's not even applicable to all kinds of pasta, practically we taste the pasta while it's still cooking and decide if it's all dente or not based on our experience.
Usually when pasta cooked the exact amount of time specified on the package it should be "al dente", but you shouldn't trust it and start tasting it a couple of minutes before that point.
Anyway not all pasta makes sense al dente, fresh pasta or stuffed pasta like ravioli or tortellini for example cannot (and shouldn't) be cooked al dente.