Depends on what text editor you want to use. Personally I use vi, but it's a bit UNIX-y for traditional Mac folks.
Command would either be "vi <filename>" or "sudo vi <filename>" for system config files.
You can also use the Open command to open TextEdit, although that's not strictly in the Terminal, it just opens TextEdit from within it. "Open /Applications/TextEdit.app <filename>" will do the biz there.