An ID, like a class is a CSS (cascading style sheets) style definition which can be applied to a particular occurence of an element. However, an ID can be used to identify one element on each page, whereas you can have several elements belonging to the same class.
For example, imagine that a company incorporates text-based advertisements into its web pages but that they only allow one ad per page. They could define an ID in their style sheet which might be something like the following:
To insert an ad on a page, they could they could simply type a paragraph of text, right-click on the <p> tag in the tag selector, choose Set ID and then click on advertisement.