A complement is a word or group of words that completes the meaning of the sentence. There are two main types of complements:
Subject complement: This follows a linking verb and renames or describes the subject. For example, in the sentence "She is a doctor," "a doctor" is the subject complement that renames "she."
Object complement: This follows a direct object and provides more information about it. For example, in the sentence "They elected her president," "president" is the object complement that provides more information about "her," who is the direct object.