What exactly is the meaning of "detent" in aviation?
A detent is usually a discontinuity in force at a certain position: the control likes to move into that position, and moving it away takes more than average force. 

Image source

In the image above, the flap detents are clearly identifiable as the notches in the guide rail: in order to move the lever away from a notch, it needs to be lifted first and can only then be positioned in a different detent.

The flight control sticks often have a detent that indicates force trim position: on either side of stick travel is a preloaded spring, and the stick can only be moved once the breakout force is exceeded. The rest of the stick travel will then simply increase force proportional with the spring gradient - if released to neutral, the force will gradually decrease until the stick falls into the breakout position.