We present the R-package mgm for the estimation of both stationary and time-varying mixed graphical models and mixed vector autoregressive models in high-dimensional data. Variables of mixed type (continuous, count, categorical) are ubiquitous in datasets in many disciplines, however, available methods cannot incorporate (nominal) categorical variables and suffer from possible information loss due to transformations of non-Gaussian continuous variables. In addition, we extend both models to the time-varying case in which the true model changes over time, under the assumption that change is a smooth function of time. Time-varying models offer a rich description of temporally evolving systems as they provide information about organizational processes, information diffusion, vulnerabilities and the potential impact of interventions. Next to introducing the theory of the implemented methods and explaining the software package, we provide performance benchmarks and applications to two medical datasets.