One of Disney's 12 principles — without it, motion feels abrupt and mechanical. A button that dips slightly before it "fires," or a character bending its knees before jumping, are both anticipation.
In UI it should stay very short (tens of ms up to about 100ms) — too long and the response feels sluggish. The key is that it moves opposite and smaller than the main action.
When to use
Save it for the one button press or character move you want to emphasize. Add it to every interaction and the whole UI starts to feel slow.