I just wonder how some website like WhatIsMyIP find out what your real IP address is, even if you use proxy server. It said : 


  Proxy Detected


and then they give your real IP address. 

Is it possible they use JavaScript to send HTTP request for not using web browser proxy settings(How could it be implemented by Java) or there is some magic technique?

There are several ways:


Proxy headers, such as X-Forwarded-For and X-Client-IP, can be added by non-transparent proxies.
Active proxy checking can be used - the target server attempts to connect to the client IP on common proxy ports (e.g. 8080) and flags it as a proxy if it finds such a service running.
Servers can check if the request is coming from an IP that is a known proxy. WhatsMyIP probably has a big list of these, including common ones like HideMyAss.
Web client software (e.g. Java applets or Flash apps) might be able to read browser settings, or directly connect to a web service on the target system (bypassing the proxy) to verify that the IPs match.
Mobile app software can identify the client IP. Example: PhoneGap plugin

