The lines represent relationships (associations among things) and by convention only certain relationships are shown on ER diagrams - usually those that represent either some business rules or intended database design most concisely. Probably we are to understand from the diagram that students are assigned to classes and less directly to rooms, courses or professors. That's possibly based on some assumptions about how such a model will be implemented in a database.
Keep in mind that an ER diagram like this is just an illustration. It is a picture which by its nature is not a precise or complete description. Alternative pictures could describe the same or similar situations.