der Haufen
pile
An unordered collection or stack of things.
Auf dem Schreibtisch lag ein großer Haufen Papiere.
There was a large pile of papers on the desk.

pile / bunch
Loading your saved state.
pile
An unordered collection or stack of things.
Auf dem Schreibtisch lag ein großer Haufen Papiere.
There was a large pile of papers on the desk.

'Der Haufen' (the pile) is related to the verb 'häufen' (to pile up), which means 'to heap something up into a mound.' So a Haufen is the result of häufen.
Die Kinder häuften den Sand zu einer großen Burg.
The children piled the sand up into a large castle.
When referring to an unordered quantity, 'Haufen' (pile) is often combined with materials or objects. Typical examples are 'ein Haufen Sand' (a pile of sand), 'ein Haufen Steine' (a pile of stones), or 'etwas auf einen Haufen werfen' (to throw something into a pile).
Im Garten liegt ein großer Haufen Laub.
There is a large pile of leaves in the garden.
In the meaning 'eine große Menge' (a large amount), 'ein Haufen' (a bunch / a lot) is very colloquial. It is used in spoken language for both countable and uncountable things.
Ich habe einen Haufen Ideen, aber keine Zeit.
I have a bunch of ideas, but no time.
When 'Haufen' (bunch / lot) describes a group of people, the word often has a negative or distant undertone. It sounds more disrespectful than the neutral word 'Gruppe' (group).
Ich will mit diesem Haufen nichts zu tun haben.
I don't want anything to do with this lot.
In the meaning 'Exkremente' (excrement), the word is almost always used in the compound 'der Hundehaufen' (pile of dog poop). It is a very everyday word for referring to dog feces.
In vielen Parks gibt es Strafen für nicht entfernte Hundehaufen.
In many parks, there are fines for dog poop that is not removed.
group
'die Gruppe' and 'der Haufen' can both mean several people or things. 'die Gruppe' sounds neutral and organized: the people or things belong together in some way or form a unit. 'der Haufen' fits more when things are lying around in a disorderly way, or when you are speaking colloquially about many things. For people, 'Haufen' can easily sound derogatory. Learners may confuse the words because both describe a quantity. As a practical rule: for people or an organized unit, you usually use 'Gruppe'; for disorder or very informal everyday language, 'Haufen' is more likely.

Nach dem Umzug lag ein Haufen Kartons im Flur.
After the move, there was a pile of boxes in the hallway.
Vor dem Museum wartet eine Gruppe von Schülern auf die Führung.
A group of students is waiting in front of the museum for the guided tour.