Loosen the strings enough to lift out of the groove in the nut. Take a soft pencil and apply it to the groove. If you play an electric guitar with a whammy bar, always have a pencil handy, or invest in a graphite nut. Graphite is a perfect lubricant and this will generally solve the problem. If not, you may have a more serious problem and need to consult a qualified repairman.
Nothing strikes fear into the novice more than the word intonation .
Acoustic guitars do not generally have individual adjustable bridge saddles so you can't use this method. First put new strings on your guitar. Tune your open strings to the tuner. The harmonic is the absolute center between the nut and the bridge. The principal here is that when you actually PLAY the note at the 12th fret, it is also the absolute center just like the harmonic.