Updated June 10th, 2019.
Your Mac has a name. It shows up various places, among them in the Shared section of the sidebar of Finder windows and AirDrop. If your Mac’s name is something like “Jeff’s iMac (3)” and you want to change it to “Tom’s Big Mac” just go to System Preferences, then Sharing, and change the name as you desire.
Here’s my Mac’s name, in the Sharing preference pane. Unless your name and computer match mine you will probably see something different.
It’s easy to change it– just type what you want, right there in the Computer Name box. That’s it!