Regardless of whether a prayer is self-composed or recited from a written form, prayer is on its most basic level an acknowledgement between an individual and God. The person praying recognises God for who/what he is and that he has the power to help them or listen to them, reiterating the value they are to him and themselves as a soul. This means it reinforces belief in the existence of God whilst building faith and the basis of a relationship between him and an individual.
Sorry that was wordy!!