Both comprender and entender are usually translated as "to understand," and in many cases — in fact, most of the time — you can use them interchangeably. However, there are some subtle differences in how they may come across.
The main difference between the two verbs when they mean "to understand" can be seen in the saying "Te entiendo, pero no te comprendo," which obviously makes little sense if you try translating it as "I understand you, but I don't understand you." Perhaps a better way of understanding this sentence would be something like "I understand the words you're saying but I don't understand what you mean."
Comprender, then, can suggest a deeper type of understanding. If you speak with an accent and want to know if you're getting your words across, for example, you might ask: ¿Me entiendes? But if what you're looking for is whether the listener understands the implications of what you're saying, the question "¿Me comprendes?" may be more appropriate.
In real life, though, these differences may not be all that distinct, and you may hear one verb used when the above guidelines suggest using the other. For example, "I know exactly what you mean" could be translated as either "Te comprendo perfectamente" or "Te entiendo perfectamente" (the latter appears to be more common) and the same goes for "Nadie me comprende" and "Nadie me entiende" for "Nobody understands me." In other words, as a Spanish student you needn't worry too much about which verb to use in most contexts. As you hear and use the two verbs, you'll pick up on whatever subtle differences exist between them in your locality.
Note that comprender can also have the meanings "to cover," "to enclose" or "to include" (and thus have a meaning related to the English word "comprehensive" rather than to "comprehend," both of which come from the same Latin source). Example: El territorio de la provincia comprende tres regiones bien diferenciadas. The provincial territory includes three distinctive regions. Entiende cannot be substituted in this sentence.