Antibiotic resistance genes are segments of DNA that enable bacteria to survive in the presence of antibiotics. These genes can be naturally occurring or acquired through horizontal gene transfer. They encode proteins that either degrade the antibiotic, alter its target, or expel it from the bacterial cell.