Go to System Preferences > Sharing

There you will see the computers name and an Edit button.

Click it and change the name to whatever you want


P