If both Apache and MySQL are showing the green running in the XAMPP Control Panel then it is possible that your firewall, Anti-virus scanner or ZoneAlarm and the like may be at fault by blocking the ports used by XAMPP - try temporarily disabling them, then try again to access
http://localhost.
If that works then you will have to configure the offender to allow XAMPP access.