The most primitive difference is that "The number of students are absent" is unacceptable English, but "A number of students are absent" is acceptable.
The phrase the number of X is always singular and takes a verb inflected for third person singular. In this construction of X is merely a complement or modifier (depending on your grammatical sect) of the number, and the number is a definite noun phrase meaning a specific number considered as an entity: the actual count of X.
The phrase a number of X is always† plural and takes a verb inflected for plural. In this construction a number, although it looks like a noun phrase, is actually a quantifier, a sort of determiner meaning approximately "several". Of X is its complement or head nominal (again depending on your grammatical sect); X is cast in the plural and that plurality "percolates up" through the determiner to govern the number of the verb. ("Percolates up" is the apt metaphor employed by CGEL, which calls nouns used this way, such as number and lot/s and bunch, "non-count quantificational nouns".)
† Well, almost always. It is possible for a number of X to occur with a singular X. For instance: Most texts of Revelation give the Number of the Beast as 666, but a few give 616. Pick a number of the Beast you like and give a plausible interpretation of that. In this case, a number is again a noun phrase and of the Beast its complement/modifier. But it took me a lot of effort to invent a legitimate instance of this practically very rare situation.