to make an earnest request out of need: to ask, beg, or plead for something one lacks
At its root this word is about need. It grows out of an older verb meaning to lack or be short of something, so to use it is to ask because you genuinely want or require what you are asking for. It is never idle asking; there is pressure behind it, the pull of someone who needs an answer.
The same act points in two directions in the New Testament, and that is the only reason English has to reach for different words. When the request is aimed at another person, translators reach for beg, beseech, or entreat. When it is aimed at God, they reach for pray. The action itself does not change: in both cases someone brings a heartfelt request to one who can grant it.
Because of that need, the word tends to appear at intense moments: a father pleading for his sick child, a leper on his face asking to be made clean, Jesus asking his Father that Peter's faith would not fail. It is a narrower idea than prayer in general. It is specifically the asking part, the petition, rather than praise, thanks, or quiet communion.