Both literal (physically tripping) and figurative (a setback, especially an embarrassing one). Often split: 栽了个跟头 / 栽了大跟头. Newspaper headline classic for politicians caught in scandals.
memory
栽 (plant, but here 'to topple') + 跟头 (somersault). You're literally 'planting a somersault' face-first into the ground.