To change your restrictions passcode on an iPhone, you'll need to go into your Settings. Where you go from there depends on your iOS version.
You can factory reset your iPhone and wipe all its data in the Settings app. If you don't remember your password, you can use iTunes instead.