"Detent is a position on a valve spool where if you push or pull the lever to detent, the lever will stay at that position and the hydraulic fluid will continue to flow.
Essentially. it holds the lever at the detent position for whatever you are doing.
Detent in the float mode will allow the the fluid to flow with the up/down motion if the cylinders.
Detent on a hyd motor spool will allow the hyd motor to run for as long as the spool in in detent.
It allows for hands free operation."
Stole that from another. But it gives a good description.
How they are set up on your machine differs from one manufacturer to another. Best bet is to call a dealer and ask them to go over it with you. If you hook up to a attachment not meant for that and hit the button, you can tear it up the seals. Different attachments require different flows, grapple needs normal flow, a stump grinder or pulverizer (Harley rake) needs high flow, etc.