Modernizr allows you to support newer features in newer browsers whilst also providing an alternative implementation of features for older browsers so you get the best of both worlds.
Example: SVG Support
So let’s say I want to put a shiny new scalable vector in my website as a header image, but I also want to support older browsers which, unfortunately for me, don’t support SVG at all (for example, the latest version of IE to support it is version 9). I could use jquery to figure out which browser I’m actually using and then change the CSS accordingly. The problem with this approach is that it’s unreliable and it won’t tell you which version of the user agent (or browser) is being used.
So that when you have
$(“#header img”).attr(“src”, “images/logo.png”);
to change the source of the image to png when there is no svg support.