Are JavaScript and Java related, and if not, why do the names look so similar?
They share a name and nothing else. Brendan Eich created JavaScript at Netscape in 1995. James Gosling created Java at Sun Microsystems, and it was released in 1995 as well. The marketing team picked the name JavaScript partly because Java was popular at the time, and the name simply stuck. An email between the two camps in 1996 even joked about renaming one of them.
The two languages differ at nearly every layer. Java is statically typed and it is compiled to bytecode that runs on a virtual machine. JavaScript is dynamically typed, and every value carries a tag that says what it is while the program runs. Classes are the main way to model data in Java, while JavaScript uses objects with prototype chains and only gained class syntax in 2015. Java has threads as a first class feature that the virtual machine controls, while JavaScript gets concurrency from a single-threaded event loop, plus worker threads and web workers for heavy CPU work.
Two practical differences come up constantly in interviews. Java is case sensitive and statically typed, so a wrong type is a compile-time error. In JavaScript the same mistake appears at runtime, and often far away from the cause. Java also compares values with equals, while JavaScript's triple-equals operator compares both the type and the value without any conversion.
If somebody claims that JavaScript is a scripting version of Java, you can correct them. JavaScript did borrow some ideas from Java, but its object model and its prototype-based inheritance came from Self and from scripting languages such as Awk and Perl.