Yes oral antibiotics can help with getting rid of a stye since that's what most doctors will prescribe for a stye is an oral antibiotic.
Most styes however will heal within 10 to 14 days even without medical treatment but the oral antibiotic can help get the stye to go away and feel much better sooner.
You can also get rid of a stye by applying a warm compress to the stye and cleaning your eyelids often with water and mild soap.
Massaging the area where the stye is and applying some antibiotic ointment to the stye can also help get rid of the stye.