It is a centuries-old tradition to place notes into the Wall.
let's go to the distant country of Morocco in the 18th century...
"Do you really think I should move to Israel?" Azulai asked his teacher, the master Kabbalist called the Ohr HaChaim.
"Yes," the Ohr HaChaim told him. "And when you arrive, here is a note that I want you to put into the Western Wall."
Azulai diligently packed his belongings, and as for the important note from his rabbi, he sewed it into the lining of his jacket to be sure not to lose it.
In Israel, Azulai was so overcome by distractions that he forgot about the note sewn into his jacket. Every day he would go to the synagogue to learn Torah, but things were very difficult. In Morocco he had been a widely respected teacher and had many friends, but in Israel he experienced loneliness and anonymity. There was no shortage of Torah teachers in Jerusalem - and Azulai was not the kind to push himself forward.
While walking home one day and feeling a bit dejected, Azulai remembered about the Ohr HaChaim's note! He immediately ran home, unstitched the lining of his jacket, and took the note to the Western Wall where he inserted it tenderly into one of the cracks.
It happened that in the synagogue the next day, someone had an intricate question in Jewish law - which "coincidentally" was found in the same chapter of law that Azulai was studying! So Azulai was able to answer the question immediately. Seeing this, another person asked Azulai a different question - which he was also able to answer. In a short time, Azulai's reputation grew and he once again enjoyed the recognition of the old days on Morocco.
A local rabbi, seeing that Azulai's fortune had turned for the better, asked, "What happened to prompt this change?"
"Oh, nothing," replied Azulai earnestly.
"I don't believe it," said the rabbi. "Something must have acted in your favor to realign the spiritual forces. Tell me!"
Azulai racked his brains, but could not think of anything specific that might have caused the turnaround.
"I do remember something," he said after a while, "A long time ago my teacher gave me a note to put in the Wall, and I forgot about it until recently."
With a little urging, the rabbi convinced Azulai to go down to the Wall and retrieve the note to see what was written inside. And this is what they read: "Dear G-d, please let my student Azulai become successful in Israel."
The upshot of this story is that Azulai went on to become one of the greatest Sages of his time, and is known far and wide today by the acronym, the "Chida."
Today, people put notes into the Western Wall every single day. The idea is not that they are praying to the Wall (that would be like talking to a wall!), but rather it is known that the Divine Presence rests on the Western Wall more than other places. (see Midrash Rabba - Exodus 2:2 and Song of Songs 2:4)
Furthermore, the Talmud teaches that all prayers ascend to heaven through Jerusalem. So writing a prayer on a piece of paper and sticking it in the Wall is like having a continual prayer linked to the prime source.
Today, with millions of people visiting the Western Wall each year, the cracks can sometimes get pretty packed with notes! You can sometimes see one person standing on another's shoulders to get their note into an available crack. Because of the great volume, every so often, all the notes are removed from the Wall and buried, along with other holy objects that are not being used anymore.