It is simpler than most people expect. Make sure you have a working internet connection, then create an online account for Battlefield 2 from the main menu.
Once the account is registered you can jump straight into the server browser and pick a match.