It looks like Hole-in-the-Head disease. On bettas I believe it presents as pin-sized holes like that...usually caused by unclean water conditions, underfiltration, etc.
I'm not sure if you can cure this disease. From what little I know, it's one you can only hope to stop before it progresses further. Hopefully someone else will have a medication to recommend. I've never had to treat this myself.