The answer is that it is ROOTED IN AND LOOSELY BASED on Marvel cannon. Here are some examples:
---In Iron Man, for instance, Tony's injury to his heart and capture are rooted in and loosely based upon his origin story going back to Tales of Suspence #39 (1963). In the comics, however, there is an anti-communist theme and those who capture him are Asian, whereas in the movie there is more of an anti-terrorist theme and those who capture Tony look more like radical Islamic extremists (that's not a characterization of all or the majority of Islam, btw). So you see the point, the origin is rooted in the comics, but heavily adapted (perhaps even re-interpreted).
---Iron Man 2 draws heavily from the self-destructive impulses in Tony as elaborated in the critically-acclaimed comics arc, Demon in a Bottle. See HERE for details.
---In Thor: The Dark World, the basic story of Malekith is adapted from Walter Simonson's run on Thor in the 1980s, which is when he created and introduced Malekith. However, Malekith is much more complex in the comics, a deceiver and schemer on par with Loki, and not the nihilist of the movie trying to destroy everything (I know that's an oversimplification, but the point is in the contrast). See here for a little info, not much but enough to see the differences: LINK.
Conclusion: I think these sufficiently demonstrate how some basic plot points are rooted in and loosely based upon comics canon. To be clear, though, they also demonstrate how the movies adapt, diverge, and even re-interpret the canonical material.