For deleting a course, you have to make sure that all the batches created inside a course are deleted. Similarly for deleting a batch, all the students enrolled in the batch should be deleted. This message denotes the existence of dependencies associated either with the batches or the students, which restrict the deletion of a course.
Even when deleting students in your School Software Pro instance, if there exist any dependencies such as elective subjects assigned to the student, finance records associated with the student etc. then a message will pop up, notifying the user about the dependencies that exist.
For more information, watch this-