I recently got a new mtb with hydraulic disc brakes and they also new to me and son I wanted to know about maintaining them, mainly cleaning, do I need to clean them? If so how often? When I wash my bike? And how do I clean them, with what?
Everytime you wash the bike
First and foremost when cleaning the rest of the bike (drivetrain especially) avoid splashing lubricants, degreasers etc onto your brakes as much as it is reasonably possible.
Clean the brake rotors thoroughly and give calipers a quick wash. This can be done directly on the bike. For rotors use solvent-based cleaner. IPA works great. There are other commercial brake cleaners available from big brands as well. A lot of experienced mechanics advise always using clean disposable gloves when dealing with brakes - decide for yourself.
Always dry the rotor after washing the bike, Don't leave water on the rotor.
If the brake lever is dirty - clean it with soapy water. Normally brake levers don't require any special care.
At regular intervals
Depending on how often you ride, could be monthly or weekly. Drop the brake pads out. They are usually held in place by a single bolt or a retaining clip. Inspect the pads for damage and wear. Lookout for uneven wear, chipped edges etc. While the pads are out clean them with IPA or brake cleaner. Use clean cloth or paper towel for cleaning.
Check the rotor for wear with a vernier caliper. Minimal thickness is usually stamped on the rotor:
Adjust the calipers.
More frequently on quick release wheels, less so on thru-axles... You will need to do it some day. place the bike in a stand, or get a friend to hold it for you. Loosen the caliper mounting bolts and adjust the caliper as needed until the rotor spins freely without rubbing the pads. Tighten bolts to recommended setting.
Replace the pads
Do this once the pads are worn, damaged or contaminated. Refer to manufacturers spec or ask your LBS for a compatible pad type. It does not have to be the same brand, just matching shape. Always clean the rotor when replacing the pads.
In case of unevent wear or glazing you can sometimes get away with just "re-surfacing" the pads. Use sandpaper to take off some material. Easiest done by placing the sandpaper on a flat surface and rubbing the pad over it. Clean the pad with IPA and reinstall. Expect a slight drop in performance until re-surfaced pads "bed in".
True the rotor
If the rotor is not true it will rub the pads. You can use a specific rotor truing tool but adjustable spanner does the job just as well. The process is very well described by parktool.
Replace the rotor
Once the rotor is worn to minimum thickness, or when damaged. Replacement process is very straightforward. Remember the threadlocker on the rotor bolts when installing the new one
Bleed the hydraulic lines
Eventually the air and moisture will find its way into the hydraulic lines. You will know it has happened when the brake lever stops feeling "firm". In very bad cases you will need to "pump" the lever a few times to get it to "bite". There are numerous articles published on bleeding brakes. If not sure, take the bike to your LBS. If you are feeling adventuruos, try it yourself and do not expect to succeed from the first attempt. It is in fact a very DIY-able procedure but takes a few attempts to learn and perfect the skill.
Cleaning caliper pistons
As suggested by @Weiwen once caliper pistons stop travelling freely (usually one travels further than the other), it is time to clean and lube them. Remove the pads, move the pistons outwards jsut a little bit (avoid them falling out completely). Clean with a cotton bud or paper towel using the same type of hydraulic fluid that your brake uses. Wipe excess of hydraulic fluid. A great video by parktool.
Hydraulic disc brakes need minimal maintenance, to the point I think I have seen more questions asking about a problem caused by cleaning them badly than I have from neglecting them. Probably the main thing is oils and grease contamination which can be avoided by keeping things away, from oils and lubes to cleaners that leave residues. Oil contamination in brushes and cloths is another problem that can occur.
Hydraulic disc brakes are self cleaning and require minimal maintenance. My suggestion is don't clean. A spray of water to wash away mud is all that is really needed, maybe a wipe of the caliper with a clean cloth.
When cleaning the bike, use a soap or dish detergent that leaves no residue. Keep brushes and cloths away from the disk and pads as these can become contaminated with greases and oils. When cleaning and lubing the chain, protect the disk with a clean cloth or plastic bag.
Other answers deal with how to clean the brakes if you decide to.