The consequences of such academic misconduct can be very serious. I don’t know what penalties are applied for cheating at your institution, but at other schools, a student may even be excluded once they are caught.
In most cases, if you confess and talk to your teacher, they will allow you to resubmit.
Academic institutions have a lot of resources and modern innovative plagiarism detection software that may confirm cheating. For example, an academic institution usually has its database where all the previously submitted works are stored. Each time a student submits a paper, it is checked by a plagiarism detection tool like Unicheck through open-access resources and a private library of an institution.
Thus, if your school is licensed to use a plagiarism checker and have a database of such papers, the chances of you being caught may be very high.