Influenza A virus infections are widespread in swine herds across the world. Influenza negatively affects swine health and production, and represents a significant threat to public health due to the risk of zoonotic infections. Swine herds can act as reservoirs for potentially pandemic influenza strains. In this study, we develop mathematical models based on experimental data, representing typical breeding and wean-to-finish swine farms. These models are used to explore and describe the dynamics of influenza infection at the farm level, which are at present not well understood. In addition, we use the models to assess the effectiveness of vaccination strategies currently employed by swine producers, testing both homologous and heterologous vaccines. An important finding is that following an influenza outbreak in a breeding herd, our model predicts a persistently high level of infectious piglets. Sensitivity analysis indicates that this finding is robust to changes in both transmission rates and farm size. Vaccination does not eliminate influenza throughout the breeding farm population. In the wean-to-finish herd, influenza infection may persist in the population only if recovered individuals become susceptible to infection again. A homologous vaccine administered to the entire wean-to-finish population after the loss of maternal antibodies eliminates influenza, but a vaccine that only induces partial protection (heterologous vaccine) has little effect on influenza infection levels. Our results have important implications for the control of influenza in swine herds, which is crucial in order to reduce both losses for swine producers and the risk to public health.