The concept of causality is naturally related to processes developing over time. Central ideas of causal inference like time-dependent confounding (feedback) and mediation should be viewed as dynamic concepts. We shall study these concepts in the context of simple dynamic systems. Time-dependent confounding and its implications are illustrated in a Markov model. We emphasize the distinction between average treatment effect, ATE, and treatment effect of the treated, ATT. These effects could be quite different, and we discuss the relationship between them. Mediation is studied in a stochastic differential equation model. A type of natural direct and indirect effects is considered for this model. Mediation analysis of discrete measurements from such processes may give misleading results, and one needs to consider the underlying continuous process. The dynamic and time-continuous view of causality and mediation is an essential feature, and more attention should be payed to the time aspect in causal inference.