It is a serious crime. The offender can face imprisonment for a long time, depending on the jurisdiction. There may also be fines.
The legal consequences are quite severe. In addition to jail time, which can range from several years to life in some extreme cases, the offender will likely have a criminal record. This can affect their ability to get jobs, housing, and can even lead to restrictions in their social life. Courts also often order the offender to undergo counseling or rehabilitation programs as part of their sentence.
Legally, it's considered sexual assault or rape in many cases. The perpetrator could end up on the sex offender registry, which will severely restrict their future opportunities and freedoms. They may also have to pay restitution to the victim for damages like emotional distress.