Fornication is a major sin which is mentioned in Quran in Sura Al-Furqan, verse 68 : And those who never invoke any other god but Allah, nor kill any soul which Allah Has forbidden. Nor fornicate, and whoever does this shall receive sever punishment).
Forgiveness needs sincere feeling of sorrow and repentance, and firm decision not to do it again and begging to Allah to forgive.
Wassalam.