I am absolutely confused with browser games...

How would one go about putting their game in a browser?

I deployed my game into the web browser and once I click the index.html file it just shows an error. I didn't expect it to work, but what's to do after this?

Also, would this work in mobile browsers such as safari on iOS or chrome on Android?

Please help, I'm completely confused. I don't know what I'm doing, at all, honestly.
How I did was by using iframe tag and simply adding a URL to the game folder on a web server.
If the index.html results in an error, then either you have errors in your project, or the browser you're using is set to a high security and prevents local access.

The second part is more likely if the game works in playtest, and automatically solved as soon as the files are placed on a server instead of being called locally. That is because that setting is intended to prevent websites from changing local files in order to prevent malware infections, and the webexport is intended to become such a website.
If you're double clicking index.html then this is what your web browser will open. And it will only open this specific file which is why it's giving you an error likely saying it can't find Actors.json. It's not running the whole "www" folder in your browser, just the index.html file that sets things going.

To test a web version of a game, you'd need compress your www folder into a .zip file and upload it somewhere that will host your game (i.e. GameJolt is one of them). Once uploaded there, GameJolt will run everything in your zip folder for you.

It is possible to host your files locally but it's difficult and can cause issues while testing too.
Thanks everyone for the replies, I know what I'm about to say is extremely nooby and all, but in order to put a URL to my game (I tried using GameJolt and it asks for a URL) I have to put it somewhere in a zip file where it can be publicly downloaded or something?

How exactly do I get the URL to work?

Also, I'm using Google Chrome if that's important at all.
An URL is a server adress.

You can either get one by renting a server with your own website from a hosting company (which usually costs a minimum of several dollars per month depending on your country, but also gives you full access and best options) or by finding and using a free filehoster (which is more limited and usually throws ads at you).
I've used Gamejolt before. You are not required to use a URL. You should be able to directly upload your game from your harddrive.
You would use some software like 7zip to turn your "www" folder into a .zip file. You would then upload this .zip file to gamejolt so it can read and run its contents in a web browser.
You can't run the browser version directly, it has to be hosted. You can make a local host with programs like xampp. If you use that, you'd put your files in the htdocs directory after installing and running apache web server. You'd copy the files from your www directory, you'll see an index.html file as an indication of where things should be.

Original thread: https://forums.rpgmakerweb.com/threads/i-am-absolutely-confused-with-browser-games.86795/