The data sets for the ISLR book (second edition) are listed briefly on pp. 13--14. To get them, you must install the ISLR2 package from https://cran.r-project.org/. In Rstudio this is easiest to do by going to the Tools menu, selecting the first option (Install packages...) and following your nose. You can also do this at the R command prompt, with a command like install.packages("ISLR2").