Hi Mauro,
You can easily prevent students and teachers from seeing inside other courses by making sure they are only enrolled in their own courses.
To completely separate groups of students and teachers so they can't see that other courses exist, you may want to consider a solution such as Multi-tenancy, available in Moodle Workplace.