We here discuss the various dynamo models which have been designed to explain the generation and evolution of large-scale magnetic fields in stars. We focus on the models that have been applied to the Sun and can be tested for other solar-type stars now that modern observational techniques provide us with detailed stellar magnetic field observations. Mean-field flux-transport dynamo models have been developed for decades to explain the solar cycle and applications to more rapidly-rotating stars are discussed. Tremendous recent progress has been made on 3D global convective dynamo models. They do not however for now produce regular flux emergence that could be responsible for surface active regions and questions about the role of these active regions in the dynamo mechanism are still difficult to address with such models. We finally discuss 3D kinematic dynamo models which could constitute a promising combined approach, in which data assimilation could be applied.