This will have been caused by a mechanical injury. Snakes which are otherwise in good health usually recover from this sort of injury remarkably well and reptiles are surprisingly resistant to infections - something like that on a human would almost certainly get seriously infected, but on a reptile something like that will generally not be an issue and even without any form of treatment will generally heal up without issue. Keep a close eye on it, it'll almost certainly go into a slough cycle immediately. If you know exactly what you're doing you can apply an adhesive bandage until the next slough (which will come off with the slough), but don't attempt to do this yourself unless you know exactly what you're doing as getting it wrong can cause more problems, and it shouldn't be necessary.
As Stuart says, keep the enclosure clean, but personally, I would strongly recommend against feeding until after the next slough.
The next slough may not come off neatly at the site of the injury. If so, don't try to remove the skin or any scab type material around the injury as it will act as a sort of bandage/protection until the following slough. If the snake is underweight you may want to offer a smallish meal after the next slough, but if the snake has reasonable body condition, just leave it until a second slough if after the first it's not closed.