Hello kufre208,
It looks as though you may have recently set up this iPhone and being asked to enter the passcode of your prior device. To confirm, are you entering the passcode to your prior device? If so, are you also connected to a Wi-Fi network and/or cellular data? If you are and continue to see this error, you'll want to restart your iPhone using the steps specific to your iPhone model outlined in the following article.
In addition to restarting your iPhone, you'll want to make sure you're running the latest iOS. You can find the steps for updating in the article below.
Update your iPhone, iPad, or iPod touch
Let us know how that goes!