Explain collaborative filtering in recommender systems

The approach of collaborative filtering is used to create recommender systems. To produce suggestions, we use data about the likes and dislikes of users who are comparable to other users in this methodology. This resemblance is calculated using a variety of parameters such as age, gender, location, and so on.
If User A, like User B, viewed and enjoyed a film, that film will be suggested to User B, and vice versa if User B enjoyed a film, that film will be suggested to User A. To put it another way, the movie’s substance is unimportant. What counts when recommending a movie to a user is whether or not other users who are similar to that user enjoyed the substance of the movie.