Take off any removable parts and wash in soapy water. Be careful of the needles.
Use a toothpick or safety pin to clean the needle, then brush out any coffee grounds.
Replace clean parts after washing and drying and plug in.
Fill tank with vinegar for single cup machines. Fill tank half way with vinegar for multi-cup versions, then run until vinegar is gone.
If it's been a while or you feel the machine needs a deep clean, run a cycle or two then wait 30 minutes so the warm vinegar has time to sit in there and descale.
For single cup machines that need a deep clean, allow the vinegar to get pulled into the machine. When it starts to brew stop it and let sit for 30 minutes so it can soak and descale, then run through.
Finish by running 1-2 cycles of just water through the machine to rinse out the vinegar.