There are some nuances (aren't there always?), but in brief, there are two things you need to know:
- Parts compose the whole, while the whole comprises the parts.
Ex: Nine justices compose the United States Supreme Court. The United States Supreme Court comprises nine justices.
- The definition of comprise is "made up of." That is why in usage, 'comprise' does NOT take 'of' after it. To use it would make the "translation" of the sentence, literally, "The United States Supreme Court is made up of of nine justices."
Now you need never again be confused by this oft-confounding pair of words!