These are called "anti-homeless spikes." They're about as friendly as they sound.
Photo courtesy of CC BY-ND, Immo Klink and Marco Godoy.
As you may have guessed, they're intended to deter people who are homeless from sitting or sleeping on that concrete step. And yeah, they're pretty awful.