James talks about Elijah, who had learned how to pray “prayer that works“. God answered his prayers. But Elijah had to learn to pray.
The Bible scripture is James 5:16-18
16 Confess your faults one to another, and pray one for another, that ye may be healed. The effectual fervent prayer of a righteous man availeth much. 17 Elias was a man subject to like passions as we are, and he prayed earnestly that it might not rain: and it rained not on the earth by the space of three years and six months. 18 And he prayed again, and the heaven gave rain, and the earth brought forth her fruit.
Let us not give up in learning how to pray. Jesus knew how to pray, and so His disciples asked Him how to pray. Abraham, Moses, David, Jesus, Peter, Paul, and the apostle John all learned how to pray.