An id must be unique in the whole page.
A class may apply to many elements.
Sometimes, it's a good idea to use ids.
In a page, you usually have one footer, one header...
Then the footer may be into a div with an id
<div id="footer" class="...">
and still have a class