The public_html folder is a directory accessible by anyone who visits your website. It’s where you store your public files such as web pages, images, and secured scripts. Placing any files in this directory will grant access to anyone who finds them, so it’s important to place only files you wish the public to have access to in it.
Let’s say you have a domain called “mywebsite.com”, and it’s the first website upon creation of your cPanel account. If you add a file called “myfile.png” in the /public_html folder, users will now see it located at mywebsite.com/myfile.png.
When you add a domain to your cPanel account, a new folder is created just for that domain. Because of this, your new website / domain will be accessible via your first domain, followed by a slash, and then the folder name. If your domain is called “mywebsite2.com” and the folder created is called “mywebsite2”, then your website will be accessible via both “mywebsite.com/mywebsite2” and “mywebsite2.com”.