"She told me he [had] majored in sociology."
This sentence is an example of reported speech (when you talk about what someone else said without actually quoting them). The verb in reported speech may be shifted back in time. In this case, that would be from the past tense of "told" to the past perfect of "had majored". However, in this example, that backshift is optional.
busyteacher.org "backshifting in reported speech"
"6. Optional Backshifting
Sometimes, backshifting is optional in reported speech. When the speaker articulating the reported speech uses the past tense in the main verb but the situation in the direct speech is still true, backshifting is optional. This is true when the reported verb is in the simple past, past progressive or past perfect."
In the example sentence, it is still true that "he majored in sociology" so the backshift is optional, and you can use either "majored" or "had majored". The link above also gives examples where backshift is obligatory.