Summarize:

A hamster can get a skin wound by fighting with its cage mate or getting scratched by sharp bedding. This wound can become infected, causing an abscess (pocket of infection) to form. When you take your hamster to your vet, they will take a sample from the wound to identify the type of bacteria in the wound. The type of bacteria will determine which antibiotic will work the best. Territorial female hamsters can bite each other. If an abscess has formed, your vet will surgically remove it and inject an antibiotic in the affected area. If the abscess ruptures on its own before surgical treatment, your vet will drain the abscess and flush the area with an antiseptic until it’s clean. For at-home care, your vet will prescribe an antibiotic ointment that you would apply to the affected area. If your hamster has a bite wound from its cage mate, put the hamsters in separate cages. If the wound was caused by sharp bedding, replace the bedding with something soft, like shredded toilet paper or paper towel. By removing the cause the wound, you can help prevent future skin wounds.
Take your hamster to your vet. Allow your vet to treat the wound. Remove the cause of the wound.