Prayer is many things and we are not going to cover everything here, but what we want to do is give some specific principles that you will find as you come to understand God more fully. These things could be backed up with hordes of proof texts, but the point is that God has revealed His character in the Bible so clearly as to render these principles obvious to anyone who wants to truly have a prayerful relationship with Him. These are good to remember.
Thank Him for what you have before you ask Him for what you need. He already knows what you need (Matthew 6:8,32); what He wants is to hear how much you appreciate what He has already done.
Tell God what you have done wrong before you ask Him to make it right. God already knows what you have done wrong, but He wants you to live in constant view of the fact that He does know all that is going on about you, more than we know about ourselves. Realizing we are open to God (Hebrews 4:13) helps us to live a more holy life.
Praise Him for who He is no matter what He does. Matthew 6:13 alludes to 1 Chronicles 29:11-12 – our prayers should have doxology in them. Until our hearts find their safety, satisfaction, and rest in God, they will have no rest. We cannot glorify God in the world until we have glorified Him first in our hearts.
Why do we pray?