Looking for tutorial link for changing player meshes with commands

Hello! I am looking for a tutorial link to learn how to make a script that will change a user’s mesh with a command. For example, " /e headless " which gives the user the “Headless Head.” Does anyone have a tutorial link, or where I can look to find out how?