It is tricky to rename an account while you are logged in to it, and easy to accidentally lock yourself out of your Pi, so first enable the root account with
$ sudo passwd root
Use a secure password, even if you intend to lock the root account again later. Then log out and log back in as root. The rest supposes a desired username of "myuname" - replace with whatever you want.
# usermod -l myuname pi
# usermod -m -d /home/myuname myuname
This first renames the account and then moves the home directory associated with it. Then log out and log back in again as "myuname". If you are still using the default password of "raspberry" on this account, do
and change password to something more secure. That should be it. Test carefully! "sudo" users seem to get updated OK, but check that your renamed account works and really does have "sudo" privileges before disabling the root account.
Should you prefer to disable the root account, do
$ sudo passwd -l root
Technically, this just locks the password - it doesn't completely disable the account. But that's probably what you want.