This is a simulation exercise to illustrate how any specific sample and data analysis you conduct is just a single draw from a larger population and multiple possible iterations of the sample and analysis.
Specify a hypothesis regarding a particular exposure and outcome and a binary effect modifier including specific measures of association (e.g., the relative risk or the odds ratio, specify the magnitudes of that association you anticipate: I suggest making everything cross-sectional for simplicity). Using the software of your choice, generate a population with 1000 people under a causal structure consistent with this hypothesis. Draw a simple random sample 100 individuals from this population and estimate the population average exposure-outcome association and the association stratified by your modifier of interest within this subset. Repeat this 10 times and write the parameter estimates and CI each time.
Repeat the data set construction, setting the causal effect to the null. Again repeat this 10 times and write the parameter estimate and CI each time (if you figure out how to automate it, run it 1000 times and post the histogram of the parameter estimates and p-values).
Please post your results from each of the 10 runs under the hypothesized effect and under the null and your code.
If you are flummoxed by this, note that example code is in Mayeda's simulation paper (which she posted last week) and in Glymour and Vittinghoff "Selection bias, just because it's possible doesn't mean it's plausible", published in Epidemiology in 2014. But write the simulation in whatever language you prefer and don't worry too much about making beautiful code.