What you conclude about if data is IID comes from outside information, not the data itself. You as the scientist need to determine if it is a reasonable to assume the data IID based on how the data was collected and other outside information.
Consider some examples.
Scenario 1: We generate a set of data independently from a single distribution that happens to be a mixture of 2 normals.
Scenario 2: We first generate a gender variable from a binomial distribution, then within males and females we independently generate data from a normal distribution (but the normals are different for males and females), then we delete or lose the gender information.
In scenario 1 the data is IID and in scenario 2 the data is clearly not Identically distributed (different distributions for males and females), but the 2 distributions for the 2 scenarios are indistinguishable from the data, you have to know things about how the data was generated to determine the difference.
Scenario 3: I take a simple random sample of people living in my city and administer a survey and analyse the results to make inferences about all people in the city.
Scenario 4: I take a simple random sample of people living in my city and administer a survey and analyze the results to make inferences about all people in the country.
In scenario 3 the subjects would be considered independent (simple random sample of the population of interest), but in scenario 4 they would not be considered independent because they were selected from a small subset of the population of interest and the geographic closeness would likely impose dependence. But the 2 datasets are identical, it is the way that we intend to use the data that determines if they are independent or dependent in this case.
So there is no way to test using only the data to show that data is IID, plots and other diagnostics can show some types of non-IID, but lack of these does not guarantee that the data is IID. You can also compare to specific assumptions (IID normal is easier to disprove than just IID). Any test is still just a rule out, but failure to reject the tests never proves that it is IID.
Decisions about whether you are willing to assume that IID conditions hold need to be made based on the science of how the data was collected, how it relates to other information, and how it will be used.
Edits:
Here are another set of examples for non-identical.
Scenario 5: the data is residuals from a regression where there is heteroscedasticity (the variances are not equal).
Scenario 6: the data is from a mixture of normals with mean 0 but different variances.
In scenario 5 we can clearly see that the residuals are not identically distributed if we plot the residuals against fitted values or other variables (predictors, or potential predictors), but the residuals themselves (without the outside info) would be indistinguishable from scenario 6.
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 having 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.]
Best Answer
Your question is closely related to another question here asking about when it is realistic to assume that data are IID. Much of my present answer is adapted from my answer to the linked question.
As noted in my answer to the linked question, the operational meaning of the IID assumption is based on the condition of exchangeability via the "representation theorem" of Bruno de Finetti and others. Suppose you have an observable sequence $\mathbf{X}=(X_1,X_2,X_3,...)$ with empirical distribution $F_\mathbf{x}$. The representation theorem says that if the values in the sequence are exchangeable then you get the conditional IID result:
$$X_1,X_2,X_3, ... | F_\mathbf{x} \sim \text{IID } F_\mathbf{x}.$$
This means that the condition of exchangeability of an infinite sequence of values is the operational condition required for the values to be independent and identically distributed (conditional on some underlying distribution function). The theorem can be applied in both Bayesian and classical statistics (see O'Neill 2009 for further discussion), and in the latter case the underlying empirical distribution is treated as an "unknown constant" which effectively gives the corresponding marginal IID result. Note also that in parametric models, the distribution $F_\mathbf{x}$ is usually indexed by a small number of real parameters, which means that the observable data values are IID conditional on those parameters.
As to whether this is an assumption that applies to the data or the sampling process, it is probably more accurate to say that it is an assumption about the sampling process that manifests in a particular type of behaviour for the data. Exchangeability of the observable sequence just means that the order of the data points doesn't matter, no matter how large the sample. So if you think that your sampling process is such that the order of the values does not give any information about them (probabilistically speaking) then you can assume that the observable sequence of data is exchangeable, and so the data is IID (conditional on the parameters of your model). Contrarily, if you think that your sampling process is such that the order of the values does give any information about them (probabilistically speaking) then the data is not IID. It is also worth noting that exchangeability can be tested empirically using runs tests, so we are not entirely reliant on untested assumptions.
In the example you give in your question, you have an observable time-series and you are of the opinion that the order of the data matters, since the proess may change over time. That means that you believe that exchangeability does not hold, so the data is not IID. In that particular case, you would probably want to use some kind of time-series model that allows for auto-correlation in the data, or changes in the process over time. So yes, you are broadly correct in your understanding of when it is and is not reasonable to assume that data is IID. For a deeper understanding, I recommend you read up on the representation theorem; you can also read O'Neill (2009) for some surrounding discussion of how this theorem applies in Bayesian and classical contexts.