They are called spurs, and for a properly trained rider, they are simply an extension of the back of the boot.
Spurs can very discretely tell a horse which side to move, and in a way that cannot be detected in a show ring.
A well-trained horse takes cues from the reins, legs, feet/spurs, and shifting of body weight.
Spurs, like anything else in life can be misused, but not usually. Only in the old westerns, did the cowboys jab the horses in that manner, and for dramatics.