I didn't panic at those times too. My friend's wanted to teach me to swim and they knew that they couldn't teach. So they let me in and hoped that i would learn by myself and to a certain extent i did.
First I used to go directly inside the water, now I stay afloat for some time and then go inside.