The built-in predicate findall(+Template, +Goal, -List) is used to collect a list List of all the items Template that satisfy some goal Goal. Example: assume

likes(mary, pizza).
likes(marco, pizza).
likes(Human, pizza) :- italian(Human).
?- findall(Person, likes(Person, pizza), Bag).
Person = _G180
List = [mary, marco, marco]

findall succeeds and binds List to the empty list, if Goal has no solutions. This can be convenient if you don't want your goal to fail just because the collection of solutions is empty. (In other cases, you would want the goal to fail if there are no solutions.)

Another difference between bagof and findall is the extent of backtracking done before binding the third parameter (List). For example, assume:

believes(john, likes(mary, pizza)).
believes(frank, likes(mary, fish)).
believes(john, likes(mary, apples)).

Then bagof and findall exhibit the following behaviour:

?- bagof(likes(mary, X), believes(_, likes(mary, X)), Bag).
X = _G188
Bag = [likes(mary, fish)] ;

X = _G188
Bag = [likes(mary, pizza), likes(mary, apples)] ;

?- findall(likes(mary, X), believes(_, likes(mary, X)), Bag).
X = _G181
Bag = [likes(mary, pizza), likes(mary, fish), likes(mary, apples)] ;

You can see that bagof is collecting frank's beliefs about what mary likes, binding Bag, then backtracking and collecting john's beliefs and re-binding Bag, while findall finds everybody's beliefs and binds them all to Bag, just once.

See also setof.