To rename your PC in windows 10 (or any previous version) follow the steps below:

Click on Windows file explorer (see 1 Below), right click on "This PC" (other versions of Windows use a different name) (see 2 below), chose "properties" from the drop down list (see 3 below)

Rename your PC (1)

The existing name of the computer is shown (see 4 below), click change settings (see 5 below), click change on the popup (see 6 below)

Rename your PC (2)

When the final window pops up type your new PC name (see 7 below), and click OK (see 8 below) close all the settings windows that you have open in reverse order and agree to restart your PC.

Rename your PC (3)