Sci-Hub works by obtaining scientific papers and eBooks from publishers' websites through various means, including accessing subscribed content using credentials shared by other users or retrieving papers from other sources. It then makes these papers available for free to users by bypassing paywalls.