Though the Bible speaks of vitally important intercessory prayer offered on our behalf by Christ (Romans 8:34) and the Holy Spirit (Romans 8:26), when we talk about such prayer, we are normally referring to one human’s prayers on behalf of another, and the Bible speaks volumes, both in instruction and example regarding such prayer.
The reason that intercessory prayer “works” is that God, to whom it is offered, is divinely powerful to act, and has chosen to answer the rightly ordered and offered prayers of his people.