How to get rid of a shared folder on Mac
Open a Finder window, then open preferences (Finder > Preferences...). Go to the 'Sidebar' tab and uncheck the options under 'Shared':



If you want to make sure your computer doesn't appear on other computers like this, go to System Preferences > Sharing and uncheck File Sharing: