If you are installing it via Softaculous or Fantastico, the installer should do it for you.
If you are installing it manually, you have to create the database and user, and then connect the database and user before the install. You use cPanel --> MySQL Databases to do that.