Apple decided to transition from Intel to arm processors, which is a big decision due to the number of applications developed for the intel architecture over the years.
The Arm and the Intel instruction set are different, and programs compiled for Intel's architecture cannot natively run on the Arm's architecture. The instruction sets are protected, and it is illegal for a company to copy the instruction set of a competitor.
Rosetta is the solution to this instruction set incompatibility problem. Rosetta is an instruction translation that transforms Intel instructions into arm instructions. The performance impact can be negligible due to the performances of the M1 chip but the long term solution is to recompile the x86_64 application to the M1 architecture. XCode has already released the toolchain for this.
If you want to dig into the subject I recommend this article about the difference between the Intel and Arm architecture.