What do some of the / directories do? When I run cd / &amp;&amp; ls I see some directories in which I know the purpose of, and then others I don't.

Here are the directories I do not know the functions of:
/etc
/opt
/private

What do all of these do? Thanks in advance.

Edit: I also see some empty folders, like /cores. Are they safe to remove?
This link explains what you want very briefly, with this Apple doc doing a better job, and this older post really explaing.

/etc: Machine local system configuration, holds administrative, configuration, and other system files; Contains host-specific configuration files.
/opt: Has a very similar role to /usr/local and they seem interchangeable. However, from my experience working with other Linux/UNIX sysadmins, there seems to be a preference for /usr/local in BSD-based UNIX OSs.
/private: The Unix core: other directories are symbolic links to folders within here
/cores: When applications crash, they can save a lot of information about the state when they crashed here.

So you can delete the content of /cores, but you shouldn't remove the folder itself.