Difference between types "js" and "module"?

If I’m going to embark on a coding project, what determines if it’s going to be included as a “js” or a “module” file?

I’ve got a few of both, and they both seem like oodles of Javascript. I’m by no means a seasoned HA developer (in case you couldn’t guess), so I’m curious to know what the difference is.

Is there a simple answer?