to flatten is to collapse a nested structure into a linear structure, to eliminate nesting by splicing elements of a nested substructure into a flatter one (one level flatter).
classic Lists it is concat. For other data structures corresponding implementation should be provided.
The crucial idea is that an ordering is not implied. Nesting does not imply an ordering. Sets could be nested, but there is no notion of ordering. Only membership.
sequential structures (a sequence implies an ordering) flattening preserves ordering.
The accompanying metaphor is removing a wooden fence one by one plank and placing them in a single row one after another.