When I try to enter a user password to delete an account, it doesn't work. and I know the password I'm using is correct I got a new computer today. I my parents logged in with a username I didn't want so I made another admin. Now, I'm trying to delete the old account. 

when I go to Users &amp; Groups in System preferences, click on the old account, hit the - sign to delete it and enter the password, the popup shakes like the password didn't work. I'm sure the password is correct because I used it multiple times to log into the account. I tried switching the old account to admin but that didn't work.
If you can't delete the user for some reason, you can remove it at the command line.

Launch "Terminal" (from /Applications/Utilities/Terminal.app, or search via Spotlight) and type:

sudo dscl . list /Users


...followed by your administrator password.  Then hit enter

The output will show you the shortname of your local users (towards the bottom).
Here I called the user to be removed "testy" (I'm only showing the last few entries):

...
admin
daemon
Guest
nobody
root
testy


Now remove the user from your system and from System Preferences (exchanging the shortname "testy" with your own, found earlier):

sudo dscl . delete /Users/testy


Then hit enter.

The home folder of that user you can either keep, if there are important files, or delete it with...

sudo rm -r /Users/testy 


...and again hit enter.

PS. A speculative answer for the permissions error received and mentioned in the comments section can be found at StackExchange:
What causes eDSPermissionError when running dscl?