How does prayer work?

I heard rumblings about "witches casting hexes" on Trump, and various Christian pastors praying to cancel out those hexes. Obviously, as an atheist, this seems absurd. My impression of what's happening is more like this:

It's atypical of Christians (or other theists)... I don't think most think of prayer as casting some kind of spell, but I don't understand how any of their "prayer models" are internally consistent.

There's a number of different conceptualizations of prayer, and how it works, I can think up.

Prayer is a spell

God isn't involved. The humans are who hold the psychic powers to change reality merely with their minds. 

One variant is that God is some kind of psychic conduit that focuses human prayer, so the more humans praying, the more powerful it is.

This seems to be the most glaringly theologically unsupported concept. It's not Biblical.

God isn't paying attention, or does not know

For some reason, God needs to be informed that something is up. It's up to humans to call up God on the blower and tip him off that someone needs saving, or car keys need to be found.

Unfortunately, this sacrifices his "all knowing" ability.

God needs convincing

Either God isn't convinced that poor Charlie, with child cancer, needs saving, or he doesn't care. It's up to humans to nag him into doing something about it. The more humans who nag, the more convinced God is to take action.

Unfortunately, this sacrifices his being a "good god". He's kind of a jerk, in fact.

It's a democracy

Maybe god can only do so much at a time, and it's an ongoing referendum for the humans to decide how he spends his resources. The top 5-10 most prayed-for topics make the pick. The better the "voter turnout", the more accurately God's actions reflect human needs and desires. That's also why poor little Timmy will spend his life in a wheelchair, while God is busy tallying results about who is going to win the Superbowl.

Unfortunately, this sacrifices his being an "all powerful" god. It also means God's "plan" for us is decided by committee.

 

I think these options can be mixed and matched, but my point is... theistic concepts of prayer makes no damn sense for a "god". It's almost as though they themselves haven't thought through the implications.

Of course, the last option is:

Guidance Councillor

This isn't intercessory prayer at all, and instead, you're just talking with God, and he gives you advice, etc.

I still don't know why you need to say anything to a god (doesn't he already know?), but the focus may be more about fostering a "relationship" with the mortals, than God having to be informed of anything.

It's the most straight forward concept of prayer, even if I - as an atheist (who spent plenty a night on his knees as a theist) - think you're just talking to yourself, and having an inner dialog.