To beg is to request something in a humble way. It often means to request something that you want to have without paying for it.
Ex: The mother, who has recently lost her job and her home, will beg the judge to let her son out of jail to assist the family in getting back on its feet.
Ex: The poor man, wracked with pain from his long¬ term back injury, had to beg for a piece of bread.
To pray is to address a being that you worship. When you pray for something you ask for something from a higher power. When you say you are praying to something or someone, you are talking about the being you are addressing in your prayer.
Ex: My grandparents, who are emigrants from Greece, always go to the Orthodox church to pray on Easter. They hold very strongly to the traditions of the church, especially during holidays.
You might tell someone to say their prayers, meaning that they should speak to a higher power or being about a specific situation or before something they are about to do, like leaving on a trip or going to bed at night. When you say that someone or something is the answer to your prayers, you are saying that they have resolve or satisfied the issue you were praying about.
Ex: Please say your prayers for me as I fly to Hawaii on business. I really don't like to fly in the first place, and tomorrow's weather is supposed to be bad.
Ex: We were so short¬handed at the festival! When one of our most helpful members happened to come by the booth and ask if he could help, it was an answer to my prayers.