Costume jewelry doesn't like water, I advise you to take it off in the shower, at the sea or in the swimming pool.
As silver jewelry is covered with a layer of real silver, it can oxidize slightly, so that it regains its shine, it's easy to rub it gently with a little lemon juice on a soft cloth.
You can also use products made for silverware always on a soft cloth.
For gold jewellery, a small bath of a few minutes in white vinegar, and rinsing with water, followed by drying with a soft cloth will suffice.