It's likely that cyl was defined on a previous slide(s). It should be a named list (based on the fact that it is used with map). Since mtcars is being used, I would guess that there was some grouping on cyl from mtcars done previously. Something like that:
cyl <- mtcars %>%
dplyr::group_by(cyl) %>%
tidyr::nest()
cyl_named <- dplyr::pull(cyl, data) %>%
purrr::set_names(cyl$cyl)
Then you can use code from the slide like that:
plots <- cyl_named %>%
map(~ggplot(., aes(mpg, wt)) + geom_point())