A cause can be sufficient, but not necessary. It represents a condition that, if it is present, gaurantees the effect in question . For example skipping an exam in the course would be sufficient cause for failing it, though students can fail it other ways as well.
A necessary cause represents a condition that must be present for the effect to follow. For example it is necessary to take college courses in order to get a degree. Take away the courses and there is no degree. However simpy taking the courses is not a sufficient cause of getting a degree. One has to take the right courses and pass them.