Unless you know the code and have the opportunity to do it again, then the device software has to be restored.
The device has to be put into restore mode and the software restored. This will erase your device, so if you don't have a backup, then there's no way to save your info.