There are a number of questions here, I’ll try to address to the best of my ability. I’m not a freelancer, but I can offer some insight to the process 
But I don’t know how to host a website from the ground up. I’ve pretty much just done stuff on either codepen or glitch, and I’m kind of at a loss for how to host a website that I make from scratch. Where can I learn about this?
Back in the day, hosting a website required you to handle every aspect of hosting, you’d have to run a computer in a closet to act as a server 24/7. You’d have to manage the software that runs the website, build the website, update and maintain the code, handle domain registration, forwarding, security and update the software and hardware. It was very common to use something like the LAMP stack.
Fast forward to today and you’ll find basically no one takes the 100% ground up approach anymore, due to the rise of cloud computing. This is where companies like Amazon, Google, Microsoft, and Digital Ocean (just to name a few) provide services from providing the hardware, to a full run-time environment.
For example, glitch provides an IDE and hosting/runtime environment that can run your code, in the cloud. If you wanted to create your own website, all you’d really need is to host/run the code, get the domain and link them so when I enter your domain name, I get the stuff from where your hosting the website. You will need to do a lot more than just those steps for production sites, like handle security, stability and updates, but the core idea is there and easy to start.
My goal is to first make and host a portfolio website for myself.
If the requirement is to have a portfolio website, then you probably could get by with any static hosting solutions out there. I would not pay for anything besides domain registration (if you want a custom domain name). Solutions like github pages provide a way to host static front-ends for free.
But after this I’d like to look into freelancing where I’d make websites for others. And for this I need to learn how to let them have access to editing the website too I suppose. I suppose I would share ownership of the website with them or completely transfer ownership to them? I don’t know how this works. I’d like just a good tutorial for noobs about this stuff.
I’ve heard of 2 approaches to freelancing and handling hosting for clients.
-
You have clients pay a small monthly fee to maintain their sites for them. This is nice in that it gives you stable income, and if you have enough experience and clients, a great way to keep a steady stream of $$ coming in when freelancing. The disadvantage is if there is a problem its up to you to handle it.
-
You hand-off the project to the client onces the work is done. Usually this involves some kind of written agreement on what work should be done, what has been done, and documentation on how the client can maintain their own code. There is always room for the client to ask for updates down the line as well.
If you plan on freelancing, I recommend reading more into the gig, as freelancing is as much technical as it is other skills. You need to be your own manager, promoter, designer, QA, IT, RnD, marketer, and finance person along with the programmer all at once.
I’d say at this point, look into freelancing to get an idea of what it will take, but keep looking into all the technologies I posted, and what others have provided to get a better idea of the technical side of things.
Good luck and keep building 