The visudo command may be typed into a terminal window, and should be used to edit the configuration file, rather than editing the file directly. If you would like to use a different editor from the one which visudo gives you, you can set the VISUAL environment variable when you run it. In the examples below I set the editor to "nano", which is a nice simple little editor.
If you are using a distribution where you have a root account, and are using it, just use this command:
On systems like Ubuntu, where the root account is not available for logging in to, and admin commands are performed using sudo itself, you can do it like this:
VISUAL=nano sudo visudo
You don't have to explicitly set your VISUAL variable - if you don't some default will be used. I mention it just because the default is often vi, and if you have never used it before it can be very confusing.