Image cropped for size from the IAF subreddit, where the bird is identified as an Australian masked lapwing. New info for me, so I checked Wikipedia:
A spur is an outgrowth of bone covered in a sheath of horn found in various anatomical locations in some animals. Unlike claws or nails, which grow from the tip of the toes, spurs form from other parts of the foot, usually in connection with joints where the toes meet the foot or the foot meets the long bones. Spurs are most commonly found on the hindfeet, though some birds possess spurs at the leading edge of the wings...Unlike claws, spurs are normally straight or only slightly curved, making them suited to striking or stabbing. In birds and mammals, their function appears to be for fighting, defense and territory marking, rather than for predation. In reptiles, spurs are usually only found in the males and are used as holdfasts or to stimulate the female during copulation...The masked lapwing (also known as the spur-winged plover) has carpal spurs. Nesting pairs defend their territory against all intruders by calling loudly, spreading their wings, and then swooping fast and low, and where necessary, striking at interlopers with their feet and attacking animals on the ground with the conspicuous yellow spurs.
More info at the link re mammalian and reptilian spurs.