Prayer is basically our appeal to God. We desire something which we are unable to get it on our own, we pray to Him to help us. We are in trouble and we are unable to get out of it on our own, we pray to Him to help us. We are not sure about a certain decision, judgement or event, we pray to Him to guide us.