What do you mean by custom OS who told you that?
Anyway you will need to wipe the phone and you will lose all data on the phone.
Turn off the phone, once it's off hold power volume up and home release power and keep holding other keys when the screen lights up.
It will start booting recovery mode. If you get no command screen try pressing a combination of keys to unhide the recovery menu.
You can navigate recovery menu by using volume keys. Power button to select an option.
You can even swipe up and down the screen to navigate the menu.
The option you will want to choose is wipe data / factory reset. Once you have done that reboot phone and set it up again.