Flatten isn’t a function you want to use, sometimes you have to. Or rather, sometimes it’s good enough. It’s a somewhat dangerous operation since it destroys data layout information and it can be difficult or even impossible to recreate it.
Flatten is named after the photoshop layer flatten command where an image consisting of several layers is “flattened” into a single layer. The analogy isn’t great though, so don’t rely on it too heavily for understanding.
In Grasshopper, when you flatten a data tree, you take all the values in it and put them all into a single list. For example a tree with three branches containing a total of ten items might look like this:
When flattened, that becomes: