Most roof leaks are caused by a poor roof slope or metal flashing. Shingles are designed to shed water and require the correct slope to do so. If the proper slope is not achieved water will sit and eventually leak. For roofs that have a low slope, different materials can be used such as a waterproof membrane.
Roof flashings are the most important factor in keeping water out of the attic. When re-roofing, contractors are not required to replace the metal flashings on the roof and this can cause problems. In addition, many low budget roofers are not qualified to install new flashings correctly. Others don't replace flashings simply to save money and increase their profits. As an inspector this is one of the biggest problems I see. When you see black tar on the roof, you have a problem that should be addressed immediately.