The incident happened Friday afternoon at Fullerton College. Police said the 18-year-old victim was pulled into a bathroom and then attacked.
Bystanders alerted authorities after noticing something suspicious. They were able to detain the suspect until police arrived.
The 22-year-old suspect was taken into custody.
The identities of those involved were not immediately released.