By default, GCC will compile for your environment (the installed processor). It is also a cross-compiler and you can optionally specify a particular processor target.
Optimization is for run-time, not for compile time. Generally, GCC does a pretty good job of optimizing your code and you can, if you wish, chose multiple levels of optimization (which may or may not be effective depending on your code and other factors).
As to switches, well, there are a large number of them and a description of each is beyond the scope of this post; have a look at
http://linux.die.net/man/1/gcc. Of course, if you're running a Linux system, the manual page (and info page) are available via the
man gcc utility. Bear in mind that the optional switches are for particular purposes and you need to have a clear understanding of what they do (from the documentation); generally, it's reasonable to use the defaults.
There are other compilers available, notably the Intel compiler; however, the Intel compiler is "pay for" and it is expensive and may not be compatible with your Linux system in all ways. If you have special needs, the Intel compiler may be a benefit but for general use on a Linux platform probably not.
Hope this helps some.