Among most Western practitioners, prayer is to ask (or pretend to ask) that the laws of the Universe (or God/The gods) be suspended (or followed justly) on behalf of the petitioners or their loved ones. Prayer is really just doing nothing while still thinking you're helping the situation. Naturally, it doesn't work. Prayer is just as illogical as superstitious rituals such as sacrificing a goat, throwing Salt over one's shoulder, not stepping on cracks, etc. The only difference is that the majority of the World's population believes that prayer is effective.
Various doctrines codify the manifest reasoning behind this certainly irrational or deceptive behavior.
Some modern intellectual believers seem to follow psuedo-philosophical justifications involving quantum physics. The same supposed gaps in mechanistic causation which allow for free will or the spontaneous beginning of our universe, may allow the almighty Deity to insert prayer fulfillment. Less popular these days are the parallelisms: Pre-established harmony involves the deity predestining the universe to appear as if it has reacted to the request of the prayer. More popular among Muslims is occasionalism which simply denies materialistic (Western) notions of causation.
Prayer and subjective feelings
People who pray may get a subjective feeling that they are in communion with God. Theist of different types can get a subjective feeling that they are in communication with, Jesus, Shiva, Vishnu, Buddah, Helios etc, or other assumed deity, deities depending on their religious beliefs. The different religions contradict each other and cannot all be true. This proves that the feeling of communication is in some cases subjective. There is no reason to assume that it is not always a subjective feeling.
morons wise guys of Conservapedia don't understand subjectivity.
Oftentimes, prayer will result in feeling God's presence or feeling like one is touched by God. This feeling of a connection is cited by many theists as proof of God's existence. (Conservapedia) People who pray may also get a subjective feeling that they are blessed with the invisible pink light of the wonderful IPU, that they are touched by the Noodly Appendage of the FSM etc.
Example of prayer
Despite being perfectly loving God allows suffering and disease. Someone gets sick, you pray for the sick person. The sick person gets well, you say God answered my prayer. Why did that perfectly loving God allow the person to become sick at all? Why do sick people and sick animals sometimes get well without being prayed for?
James 5, 14 -15 promises that if the elders of the church pray over you then you will be cured. Well where's the evidence that patients that have been prayed over always recover? Perhaps modern Fundies miss out the magic oil.
Can prayer move mountains?
According to Matthew 21,21 and other verses prayer can indeed move mountains.
If ye have faith, and doubt not, ye shall not only do this which is done to the fig tree, but also if ye shall say unto this mountain, Be thou removed, and be thou cast into the sea; it shall be done. Has this ever happened? If a mountain ever fell into the Sea or Ocean it would cause such an enormous tsunami that history would record it.  Any number of Christians have faith, Christians who don’t know about the tsunami might well pray in faith for a mountain to move but history does not record a mountain moving. This verse of the Bible can’t be literally true. Further a mountain moving would leave clearly recognisable traces. 
By the way if Jesus was an ignorant 1st Century wandering preacher we can easily understand him talking about prayer moving mountains. Those who imagine Jesus was God and was therefore omniscient must wonder why on Earth Jesus would encourage good people to pray for such a devastating tsunami? Why does God allow tsunami in any case?