how do you use an equalizer?

if I get an equalizer, how do I know which frequencies do adjust, also any recommendations?
I would use the equalizer to compensate for room effects and system imperfections, as well as to reflect my frequency response preferences. For the compensation part, use a sound level meter and a frequency sweep recording to find the settings that provide the flattest response. There are dedicated systems made by Rives and other companies that do this very well.

After these adjustments, I would add any additional changes for personal taste, such as boosting the bass, etc. Clearly, this last is not an audiophile approved adjustment, but hey its your system, not theirs.

Equalizers that I have owned and liked include those made by Audio Control and Rane. The Audio Control line offers a selection of features you may want. Rane makes products more for recording pros, and I think they cause relatively fewer insertion losses. Remember when picking an equalizer that sometimes the room resonance issues you want to address are relatively narrow in frequency band, so you might want a unit that offers some precision with many narrow bands of adjustment.

Another equalizer that I have heard good things about is the Cello Palette, now long out of production. I have never owned one, but I understand it is quite "musical," although it doesn't offer control over a large number of bands. Made by Cello under Mark Levinson (the man), the Palette was originally quite expensive, but it could be fairly affordable used. Good luck.
Just a note on the Cello, it was not intended to address room anomalies, it was intended to compensate for the equalization and gain-riding used by record companies in mixing their recordings to make them more listenable on a good system; that does indeed translate to "musical", and it is a great product in that regard. That is the other use for an equalizer in your system. Jameswei's post is excellent; I'd only add that many beginners wind up using an equalizer ultimately to add overall gain to the system; I know when I started out that's what I did. Don't fall into that trap, as all equalizers, at least those in the analog domain, do degrade the signal to some extent, so it's best to use equalization sparingly to affect only the frequency ranges that help you enjoy the music most.
A spectrum analyser (also called a Real Time Analyser, RTA) is by far the best way to see what you have to deal with, and to assess your corrective actions, whether these be passive room treatments or electronic. The Pro Sound Behringer DEQ2496, about which there have been many postings, is versitile, sounds good, and is inexpensive. Check it out.
Also remember that anytime you adjust a freq's gain you also affect its phase relationship with respect to the other freq. within the music so make as little adjustment as necessary.
I second Cford and would add that cutting is much safer than boosting signals.

An equalizer not only alters phase but cuts your primary signal coming out of the speaker and therefore all the signal you hear (including the reverb, secondary or room modes); therefore it should be used sparingly.

Cutting the primary signal to achieve a flat combined response will leave the primary signal at a lower level than normal compared to the rest of the primary sound (which will be farly flat across the frequency spectrum if your speakers are any good).

Therefore equalization is probably best applied to only the very lowest frequencies...where your ears/brain are less able to distinguish primary from reverberant sound.

Acoustic treatments should be preferred as they affect the reverberant sound only, however, it is very difficult to tackle room modes below 60 Hz without using extensive treatments and even rebuilding the entire an PEQ is a good practical solution in this case.
I did a little checking and in the area of affordable recently produced digital equalizers I came up with a geat audiophile grade equalizer in the DBX Driverack 260 for around $900. It has type 4 conversion and high end Dacs. The DBX Driverack "Studio" monitor equalizer was recently discontinued and is essentially the same equalizer as the 260 and can be had for around $350 with a $100 dbx measurement Mic included (normally seperate) if you are lucky. Look for the Mic included if you don't have one. These two DBX equalizers have the ability to automatically analayze your room and set roughly 26 channels at one time which you can then taylor to your own liking and save into memory. A cheaper but not quite as good but capable digital EQ is the Behringer Ultracurve Pro.

In the area of analog graphic type EQs with manual knobs several audiphile quality but older ones come to mind: Luxman from the 80's and Audio Control C-101 with series from 1 to 3 from the late 80s through early 90's and their lastly produced SE produced in about 1997 are available and also older ones from rotel. These older graphic type audiophile grade EQs can be had for around $100 to $220 depending on condition.

Yamaha and Harman Kardon though not quite as high end still have some EQs that are decent and produced in the 90s floating around. The only home EQ analog type that is currently made and commonly available is the AudioSource EQ for around $130 which is not to be confused with the high quality Audio Control EQ which was lastly made in the mid 90's sold in the area of $750.

Before spending alot of money on remodling your listening room or buying expensive cable I would take a serious look at the digital DBX EQs (260 or recently discontinued "Studio Monitor" - not the PA EQ) firstly or others as your budget permits. This DBX EQ is thin but has rack mounts on the end and you will need XLR cable or RCA to XLR adapters if you are not already using them. However it is small enough to put at the back of a shelf out of the way if you want. The improvement in your music from a quality EQ is night and day! Your ears may very well tell you the audio snobs who avoid EQs at all costs need to take a hike!