classes can be used unlimited amount of times, an ID can only be used once. I use IDs for things like id="container" or id="header" or just something that is unique and won't be used again. Classes are good for repeating items such as something like comments in a blog.
ID values can be used once per page, whereas class values can be used repeatedly. You can have multiple IDs, like id="value1" and id="value2" on a page, but you cannot have two IDs on the same page with id="value1"; in these cases classes would be better. It's a best practice to restrict the use of IDs to global page elements, such as your header, menu, content area, sidebar and footer, or for those page elements you intend to modify via the DOM (using JavaScript).