So far, you have implemented view controller scenes in Main.storyboard using Interface Builder. You added ExploreViewController, a UIViewController subclass to manage the collection view inside the Explore screen, and RestaurantListViewController, a UIViewController subclass subclass to manage the collection view inside the Restaurant List screen. However, you still haven't learned how the code you added to each of them works.
A collection view displays an ordered collection of collection view cells using customizable layouts.
The layout for the collection view is dictated by UICollectionViewFlowLayout.
The data displayed by a collection view is normally provided by a view controller. A view controller providing data for a collection view must conform to the UICollectionViewDataSource protocol. This protocol declares a list of methods that tells the collection view how many cells to display and what to display in each cell. It also covers the creation and configuration of supplementary views (such as the collection view section header).
To provide user interaction, a view controller for a collection view must also conform to the UICollectionViewDelegate protocol, which declares a list of methods which are triggered when a user interacts with the collection view.
Let's see how this works by implementing a view controller for a collection view in a playground, which will display a collection view in the playground's live view, which acts as a display screen for the playground.