How can I keep eyeliner from smudging or smearing?

How can I keep eyeliner from smudging or smearing?