Are there chemicals or are there natural ways to do it?
yes and yes.
the best way is lots of small water changes or a few large ones depending on what is wrong.
how often should I test my water or should it only be done if you suspect something is wrong?
that is very specific to each keeper.
I'm in the group that only checks if I suspect something is wrong
there are some very anal keepers out there that check their conditions everyday,
fair play to them but not something I feel is needed.
the main 3 to check for are ammonia nitrItes and pH
those can kill very quickly if they are out of kilter.
then you may wish to check the nitrAtes (byproduct of ammonia and nitItes being broken down)
as they can build up to dangerouse levels over a few weeks
and the kh.
kh buffers the pH so a low kh could lead to fluctuatng pH levels
which in turn stress the fish and may leaed to any number of disseases or parasite getting hold of the fish.
if you want to get into the rest of testing the other stuff you can check your co2, copper, iron, oxygen etc
but that goes far beyond any basic hobbiest.
you may find the water topic I did helpfull (see sig)
for a beginners guide to what is in your water.