An example speaks a thousand word...
You are teaching a class named CW1601B. In that class, there is a total of 38 students each having a unique id (assuming it is the student name). How do you choose a particular student to answer your question during a lesson? Yes, you call that student by id (name), right? Coming to the end of the lesson, you dismiss the class by calling the class name, right? Of course, you can also call out the 38 ids(names) one by one. The same concept applies in the naming and selection of HTML elements in JQuery and CSS.
Learn
jQuery Selectors[
^]