Luke 18:9-14 And he spake this parable unto certain which trusted in themselves that they were righteous, and despised others: Two men went up into the temple to pray; the one a Pharisee, and the other a publican. The Pharisee stood and prayed thus with himself, God, I thank thee, that I am not as other men are, extortioners, unjust, adulterers, or even as this publican. I fast twice in the week, I give tithes of all that I possess. And the publican, standing afar off, would not lift up so much as his eyes unto heaven, but smote upon his breast, saying, God be merciful to me a sinner. I tell you, this man went down to his house justified rather than the other: for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted.
The Publican was a "tax-collector", the lowest of the low in Jewish society... much like today! The Publican was humble and contrite while the Pharisee was proud and self-righteous. The meaning is clear given the first and last sentences of the parable:
And he spake this parable unto certain which trusted in themselves that they were righteous, and despised others:
for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted.
God heard the prayer of the humble Publican. He did not hear the prayer of the Pharisee. A very telling detail of the ineffectiveness of the Pharisee's prayer is in this sentence: The Pharisee stood and prayed thus with himself — "prayed thus with himself" — his prayer went nowhere; he was talking to himself! God was not listening to such egocentric self-congratulation as uttered by this Pharisee who looked down his nose at others including the humble and contrite Publican.
Isaiah 66:2 ...to this man will I look, even to him that is poor and of a contrite spirit, and trembleth at my word.
I hope you have found this helpful.
May God bless you,