First, remove the strings. Or, more likely, wait till the strings need replacing. If you are a bass player you might want to clean the strings separately.
Wipe the fretboard with a dry cloth; an old t-shirt or clean old sock will do; microfiber cloths are even better. You can use a slightly damp cloth if the dry cloth proves insufficient. If any part of the cloth picks up grime use another part of the cloth, lest you end up transferring grime from one area to another. Some people find a toothbrush useful for frets; never use this toothbrush for anything else!
The metal Frets can be cleaner with some very soft steel wool. Cover the wooden fret board is possible, and cover the magnetic pickup lest they attract any of the steel wool. Some online stores sell a thin card with a slot that lets you cover the wood while polishing an isolated fret. Else, use an old credit card.
If the fretboard is dry, it can be treated with a very small amount of lemon oil. Some people use linseed oil instead.
Polishing with a soft cloth is the best option; microfiber cloths are recommended. Dampen the cloth is necessary.
NEVER USE FURNITURE POLISH, as this can soak into the guitar body and give you a dull sounding instrument. Damage like this cannot be undone.
If you want to polish the surface then buy polish from a Luther or guitar shop. Apply sparingly.
The metal parts of the guitar or bass can be polished with glass cleaner. Apply to the cloth and avoid touching the glass cleaner to the wooden surfaces of the instrument. Else, just use a microfiber cloth.
Avoid over polishing any fancy metal coatings like gold. These are thinly plated on a base metal, and you don’t want this surface to be polished off.