Playing online assumes that you understand the protocol that the company is using for the clients to connect to their servers. Your problem sounds like something is blocking you from reaching EA servers and this could happen due to a improper configuration of your firewall, ports closed or limited availability. In both cases you should check and see if there isn't an ongoing scheduled maintenance operation in progress or if your router is configured properly.
Details of how to open ports and configure your router or firewall are provided in the support section of EA websites.