How exactly do I ask G-d for forgivness for a wrong doing? Do I ask forgivness of the person wronged or of G-d, or of both? How do I know that G-d forgives me? Will he punish me? What is the fullest and most sincere way to ask for forgivness?
There are two types of sins – those between man and g-d and those between man and man. The first kind – you have to repent before Hashem only since the sin is only towards Hashem; the second kind if sins – the sin is towards Hashem and man and so you have to be atoned by G-d and man as well. More so the Rambam (Laws of Teshuvah 9;2) teaches that unless one resolves the conflict he had with the friend he will not be atoned for that sin. If one is sincere with his Teshuvah and repentance, we are promised that we will be atoned. There's nothing that Teshuvah can't atone. Sincerity though, is measured by g-d himself not by man; however tears are a good indication. The best level of Teshuvah will be out of love to Hashem and not the fear of the punishment or the bad feeling of the sin, "Teshuvah MeAhavah" in the words of our sages. To get a better picture you might want to see the book "Laws of Teshuvah" by the Rambam (Maimonides).