I saw that Tor is changing my real IP when I am using it. But is it possible that websites or browser play a game to detect my real IP?
It depends what application you're using and how you do it.
The Tor browser bundle won't hide your real IP from other applications running on the same machine, including PDF readers etc. That's why you shouldn't open attachments from Tor.
Using Tails is better, as direct internet access is generally forbidden by default for all applications.
Tor does as best it can to hide your ip and is trusted by thousands of people every day.
Malware and such can be used to circumvent that. There are lots of information on the tor blog about the exploits that are discovered.
You can check your ip through the check.torproject.org site for example after connecting to tor. This will show you the ip that the regular web servers will see instead of your own.