"Apache Tomcat is an open source web server and servlet container"
My problem is that i dont fully understand what apache tomcat is used for.
localhost is just a networking word that means "this computer." You can try 127.0.0.1 if you really don't like localhost. Any computer you're on, localhost/127.0.0.1 mean "this computer." So if you want Tomcat to handle things for "this computer," localhost is a good idea. But people can't connect to your computer by typing in "localhost' or "127.0.0.1" If they know your machine's network name (or LAN IP), they can use that. Note that this network name is only usable by those on your LAN, and someone from the outside world (like me) can't connect to your computer through that name.
I spent hours trying to change the hostname:"Localhost" to something else because i convinced myself that it could be used as a web server(i pretty much want to make a website).
Depends on how you set up your machine. You can't just download a server application and tell people to connect to your computer. The server application (i.e. Apache Tomcat) just handles incoming connection requests, more or less. But it doesn't tell people how to connect to your computer. In order to connect to your computer from the outside world, people need to know your IP address. If it's just for your LAN, your computer's network name will be good enough.
Can other people connect to this server or is it just for servlets and jsps?
It's like this: the IP address is your address, and the server application is the butler at your house. When people come to your house, the butler is there to handle them. But just having the butler (server application) isn't enough, because you need people to know your address (IP address) in order to find your house.
And what would you change it to?
Right now though, all i really want to do is change the hostname:"localhost" on port 8080, to something else while still being able to connect to the server.