There are a couple of options here, easiest is to individually remove the students who no longer have access:
Go to Course Administration > Users > Enrolled users > select the red circle with the cross to the right of the student name.
This could be a bit cumbersome if you have a lot of people to remove.
If the course allowed students to enrol themselves on it, then they can unenrol by accessing the course area and selecting Unenrol me from [coursename]
Access the Reset button from the Course administration block
Select the role that the users you want to remove have.
» Quick help