Go to “Site Administration”, Choose “Courses” and click on “Manage courses and categories”.
Under “Manage course categories and courses”, search for the course you want to enroll in and select the course you have search.
Once you have clicked on the course, scroll down and click the “Enrolled users” button and you can see the list of the users that are enrolled on the course.
When "Enrolled users" is clicked, scroll down and look for the user you want to unenroll on the course by clicking the "Trashcan icon".
Note: You can apply the filter to find the users easily.
Once done, the user will no longer access the course.