If you've joined someone else's library, you can leave it by clicking the Settings cog in the toolbar.
You'll see something like this:
Remove a student from your library
If you are the owner or co-teacher of a library, you can remove students (or any other authors in the library) by using the Author picker. Find the person you want to remove, then click the 3 dot menu to remove them, as per below.