When "something smarts" it just means that something hurts.
The saying goes back several years ago.
So if you get hurt or are in pain you can say that smarts instead of that hurts but I prefer to just say that hurts.
The first time I heard that saying of that smarts is on the Lucy Show and I had to look the definition up.