Okay ...
Take a cup of coffee/soup/soda first, because this is going to be a reasonably long post.
Basically the suspension depends on 3 things : preload, bound and rebound. We'll go through them one at a time.
-----
Preload is basically the spring's tension (or the air pressure in case of air suspension). Ideally this must be set to a level where the fork compresses around 20% when you are on the bike.
This is important because it allows you to have 80% of your forks' travel for bumps. The other 20% is for situations where your front wheel would normally be lifted clean off the ground.
To set this up, you need to know the forks' travel (80, 100, 120mm). put a ty-wrap or rope around one of the forks' upper legs, tighten it securely and slide it all the way down.
Get on the bike (lean with your ellbow against the wall if necessary) and sit like you normally would. Then get off again and extend the forks completely. Measure the distance between the ty-wrap/cord and the fork's seal. Adjust if necessary.
That should give you a good starting point. If you notice the suspension bottoms out too often or never compresses fully, you may want to adjust the preload until it suits your preferences.
-----
Bound is the inward damping. That is meant to slow down the compression of the forks. There is no formula for that, but there are some guidelines.
Fast/low bound means that the forks can contract fast, whereas slow/high bound means the movement is slowed a lot.
Basically the front wheel will move up when it hits a bump. The bound is meant to slow that down as much as necessary.
If the bound is too fast/low, the front wheel will continue its upward movement and lift itself off the ground, meaning you don't have control over the front wheel.
If the bound is too slow/high, the forks won't compress fast enough and the entire front end of the bike will be pushed up. It stands to reason that this also has a negative influence on the handling.
As for how to set it, the optimal value depends on the terrain, the speed and your driving style. Basically you'll need to learn how to feel what the forks are doing.
Once you get a feel for them and understand what's going on, you can adjust to your liking.
-----
When the fork is compressed due to a bump (or rock, or branch or whatever caused the compression), the spring (or air pressure) will cause it to extend again.
Rebound is the setting that slows down this process. It's just as important as the bound and unfortunately you also need to feel it work and understand what the bike is doing before you can successfully adjust it.
Too little rebound damping will cause the forks to extend too rapidly, causing the pogo-effect of older forks.
Basically the fork extends too fast and the entire front end of the frame is lifted a bit. Once the forks are extended, the frame will drop again and this will compress the fork again (not as much as before tho). It can feel like a bouncy ride.
Too much rebound damping will cause the fork legs to extend too slowly. This will cause the front end of the bike to drop a bit after a bump, and can also mean that the forks can still be extending at the moment of the next bump, which means you have less travel to soak up that bump.
As with the bound setting, the correct setup depends on the terrain, the speed, your driving style, etc.
There is no set formula for this and you really need to test it yourself by trial and error.
-----
I know it's a lot to read, but I urge you to read it two or 3 times. Read it slowly and take the time to understand it.
There's one more thing you need to understand, and that's the following bit :
While suspension set-up may have an effect on the bike's grip and behaviour, don't expect to become a better driver once it's set up properly. Ride a lot and improve yourself first.
Once you can feel what the front wheel is doing, you can start setting the bike up. At that point you'll really feel the difference of any adjustment to either setting.
If you're still working on your own skill but know someone who knows how to set up forks (and has a similar weight to you), ask him/her to set them up.
The resulting setup may not suit you 100%, but it'll probably be a lot better than a default setup.
-----
As for maintenance of modern forks, I prefer to leave that to my local bike shop.