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.
If you buy an iPhone second-hand and it has iCloud Activation Lock activated, and the seller is unavailable, you can still get going with the iPhone. Here's how to remove iCloud Activation Lock ...