There can be many reasons for squeaky brakes but the two most common causes are oil or some other contaminant making its way onto the pads and rotors and uneven bedding in of brakes pads causing vibrations in the braking system.
Cleaning mountain bike brake pads.
Cleaning mountain bike disk brakes is done by removing the wheels wiping disc brakes with a clean rag and brake cleaner or isopropyl alcohol.
Cleaning mountain bike disk brakes.
Squeaky disc brakes are hated far and wide in every corner of the mountain bike community.
Rim brake pads can filed to assist them bedding in when new or to freshen up a well used set.
To tune the brakes up even more scuffing up both the pads and calipers with fine sandpaper and finally reinstall and bed them in.
Disc brakes work best when there is a consistent braking surface created by material transfer from the pad to the rotors.
With a small enough file and plenty of care this can be done with the brakes still on the frame use a thick cloth to protect the rim.
How to determine the type of brakes.
V or rim brake cleaning.