There are two ways to change your PSN name - either through your PS4 or a web browser.
On PS4, navigate through Settings > Account Management > Account Information > Profile > Online ID then enter your chosen Online ID and follow the prompts to confirm availability and make the change.
On a browser, sign in to your PlayStation Network account then select PSN Profile. Click the Edit button by your Online ID, then enter your chosen Online ID and follow the prompts.
Depending upon your region and PlayStation policy charges may apply to change the IGN