Why my iPhone switches from wi-fi to 3g each time screen blocks and does it take any data during? (or how to check it)
That is a feature to preserve battery life. If your iPhone is jailbroken, you can install Insomnia from Cydia to keep WiFi active while the screen locks.
If you want to check your data usage, you can go to Settings >> General >> Usage. There, you can check under "Cellular Network Data" for how much data you have used. You can reset that, then lock your screen for some time, come back and check what has changed.
Hope this helps!