This is in the context of two random variables. A frequent assumption (e.g. of the error term in ANOVA) is of independent and identically distributed random variables. There is a question on this site asking how the assumption can be checked in a given dataset. Is it an assumption or a fact?
In practice being independent and identically distributed is an assumption; it may sometimes be a good approximation, but it's next to impossible to demonstrate that it actually holds.
Generally, the best you can do is show that it doesn't fail too badly.
This is what diagnostics, and to some extent hypothesis tests attempt to do. For example, if someone looks at an ACF of residuals (for data observed in sequence) to see if there's any obvious serial correlation (which would mean that independence didn't hold) ... but small sample correlations doesn't imply independence.
[If you're trying to assess assumptions for some statistical procedure -- or especially if you're trying to choose between possible procedures -- it's generally best to avoid hypothesis tests for that purpose. Hypothesis tests don't answer the question you really need an answer to for such a purpose, and using the data to choose in that manner will impact the properties of whichever later procedure you choose. If you must test something like that, avoid testing the data you're running the main test on.]
Just to add to the discussion, this is mostly an assumption that simplifies the mathematics of inference.
To take a concrete example, I am in the field of image processing and usually most algorithms will assume that the noise in the image is IID. This is hardly ever the case because most of the time we do some pre processing on the imaging (for ex: smoothing or averaging) and this will introduce correlation among neighbourhood imaging pixels. Also, pixels belonging to similar structures will have similar properties, the point spread function of the measurement device etc. will all make the IID assumption strictly not true.
In any real world case, it usually turns out to be an assumption but it depends on what you are trying to achieve to be able to tell whether the assumption is valid or not.
It depends on the problem but iid is usually an assumption based on two random variables being approximately independent and identically distributed (or at least we have good reason to believe they are). In most cases where we assume iid, we can't make the claim of perfect independence or that the distributions of the two random variables are perfectly identical, but we make the assumption anyway and then check the assumption based on the data.
However, there are some cases when iid could be considered a "fact." For example, consider an experiment where you put a single die in a cup, shake the cup, and roll the die. If you do this twice, I do not think anyone would have trouble accepting as fact that the two rolls of the die are iid.
De Finetti would say that conditional independence is a logical consequence of your assumption that the sequence of random variables whose values you can observe in your experiment is exchangeable.