It happens but is not commonplace. Several cases have made national news, including female COs who became pregnant by inmates. Any sexual contact between a CO and inmate is legally considered rape due to the inmate's compromised position, and prosecution almost always results in prison time.