illustration (attribution, if any possible, is at the end of the article)
The twelve nidānas capture the concept of pratītyasamutpāda, dependent origination, and they notably explain the origin of dukkha (suffering) to be in avijjā (ignorance).
It is to be said — in line with e.g. not clinging to a particular translation of the four noble truths, cf. gplus.wallez.name/65Yw2aukGKN and gplus.wallez.name/FmJ3YsTLrSo — that there is nothing critical about these twelve steps being twelve. The notion of "dependent origination" is in fact presented with 6 nidānas (DN 1), 10 nidānas (DN 14) or 9 nidānas (DN 15) by the Buddha, depending on what he teaches at a particular time, to a particular audience, in a particular context.
The classical twelve-links version is:
• from avijjā (ignorance), saṅkhāra (fabrications, volitional tendencies) arises;
• from saṅkhāra, viññāṇa (consciousness) arises;
• from viññāṇa, nāmarūpa (name&form) arises;
• from nāmarūpa, saḷāyatana (six sense-media) arises;
• from saḷāyatana, phassa (contact) arises;
• from phassa, vedanā (feeling) arises;
• from vedanā, taṇhā (craving) arises;
• from taṇhā, upādāna (clinging/perpetuation) arises;
• from upādāna, bhava (becoming) arises;
• from bhava, jāti (birth) arises;
• from jāti, dukkha arises (with ageing, sickness, death and dissatisfaction).
Unfortunately, it is easy to make the mistake of splitting nāmarūpa (name&form) into nāma (name) on one hand, rūpa (form, matter) on the other —e.g. mind vs. body, or abstraction vs. actuality— and, in my view, doing so is not capturing what's important here.
A description by the Buddha (SN 12.2) is often mis-interpreted: "And what, monks, is name&form? Feeling, perception, intention, contact and attention: this is called name. The four great elements, and the form dependent on the four great elements: this is called form. This name and this form are, monks, called name&form."
Neither 'name' nor 'form' can exist independently. In particular, neither 'name' nor 'form' has an inherent, intrinsic, independent 'dynamic' or 'functioning'.
As indicated in the twelve links of dependent origination, nāmarūpa (name&form) arises from consciousness. When considering fine discriminations in relation to 'consciousness', it is sometimes helpful to translate it 'awareness'… 'consciousness' is an 'awareness' of what's going on, an 'observer'. As such, it requires 'objects' to pay attention to: saṅkhāra (mental fabrications).
If you consider these 'objects' as primary, 'consciousness' is what appropriates these as its point of attention, its focus. Hence, 'consciousness' arises from its 'objects'.
nāmarūpa (name&form) arises from consciousness, i.e. nāmarūpa relates to this 'observer'.
'Form' is like a foreground arising on top of a background, i.e. we see colours or we hear sound waves but for a 'form' to appear, a 'consciousness' needs to 'distinguish' or 'discriminate' some part of the stimulus from the rather-chaotic rest.
We 'learn' this slowly as babies, and this is why newborns don't actually 'see' at first: they cannot distinguish a foreground from a background, they just see lots of colours and lights but they don't make 'sense' of them. Then they start learning that some combinations of colours often go together, and they start conceptualising 'permanent' forms. But this is the point: it is a 'conceptualisation', an 'identification', by a consciousness. This 'identification', we call 'name'.
Name&form refers to the fact that we do not perceive the world directly and so 'form' can only arise from a consciousness interpreting it as such, a foreground taken out from a background, some conceived 'entity' from a bigger 'picture'.
Thus, 'form' should never be conceived independently from 'name'! Any separation of nāmarūpa into nāma and rūpa is missing the co-dependent arising, a critical point of the teachings. To narrowly refer to SN 12.2 as saying otherwise is the denial of a wider and richer corpus of suttas.
This is not to say that everything is in your mind: this is only to say that everything you experience is in your mind (although it is also dependent on having a 'body', even if you merely imagine it!). And what are dissatisfaction and suffering (dukkha), if not an experience?
What the Buddha focused upon is what we can do to cease dukkha, he made clear that metaphysical questions were not his point, not that there's necessarily nothing interesting to say about them, but because they wouldn't help towards the cessation of dukkha. When questioned on such questions, he usually remained silent but, on at least one occasion, he made clear why (MN 63). What the Buddha focused on is that reality is not as we imagine it is. What the Buddha focused on is the twisted views the mind creates and perpetuates, which prevent "seeing things as they are." So, in metaphysical terms, we could talk about rūpa and about what reality is (outside of our experience), but that was not his point… His point was the mind and nāmarūpa relates to the mind's take on 'form', not 'form' in itself.
image: "organised chaos" by © Emmi liesma.deviantart.com
Post Scriptum: I strongly recommend watching the 15'10'' video from gplus.wallez.name/eKjeajLuZwp as another exploration of name&form (and of sharing a common reality), without any buddhist reference!
When interpreting the twelve links in a context of rebirth (rather than a context of moment-to-moment re-appropriation of "who you are"), nāmarūpa is considered to capture 'embodying', or finding a vessel for the consciousness to 'live in'.
Again, please note that this body might be 'fictitious', a mere delusion of separation between a 'self' (foreground) and the rest of the web of existence (background): nāmarūpa still does not point to a separate body which could be understood independently from a mind. And again, it doesn't reject the idea of a physical inherent actuality, it simply is not concerned with it.
Sometimes, this 'embodying' is presented as the "five aggregates" (skandhas) hoping to separate 'form' from the other four aggregates, but that'd be again a misunderstanding of 'form' and would also neglect to justify why the four other aggregates are independently listed in the twelve links.