When i select a answer form a search engine, a "curly tail" thing pops up at the top of the page, and it redirects me to a page i didn't select.
Every time Firefox opened
You can find the connection setting here: Tools > Options > Advanced : Network : Connection
If you do not need to use a proxy to connect to internet then select No Proxy
See "Firefox connection settings" in Server Not Found - Troubleshoot connection problems
Do a malware check with a few malware scan programs.
You need to use all programs because each detects different malware.
Make sure that you update each program to get the latest version of the database.
http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
http://www.superantispyware.com/ - SuperAntispyware
http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and What to do when searches take you to the wrong search website