Farm animal welfare is a major concern for society and food production. To more accurately evaluate animal farming in general and to avoid exposing farm animals to poor welfare situations, it is necessary to understand not only their behavioral but also their cognitive needs and capacities. Thus, general knowledge of how farm animals perceive and interact with their environment is of major importance for a range of stakeholders, from citizens to politicians to cognitive ethologists to philosophers. This review aims to outline the current state of farm animal cognition research and focuses on ungulate livestock species, such as cattle, horses, pigs and small ruminants, and reflects upon a defined set of cognitive capacities (physical cognition: categorization, numerical ability, object permanence, reasoning, tool use; social cognition: individual discrimination and recognition, communication with humans, social learning, attribution of attention, prosociality, fairness). We identify a lack of information on certain aspects of physico-cognitive capacities in most farm animal species, such as numerosity discrimination and object permanence. This leads to further questions on how livestock comprehend their physical environment and understand causal relationships. Increasing our knowledge in this area will facilitate efforts to adjust husbandry systems and enrichment items to meet the needs and preferences of farm animals. Research in the socio-cognitive domain indicates that ungulate livestock possess sophisticated mental capacities, such as the discrimination between, and recognition of, conspecifics as well as human handlers using multiple modalities. Livestock also react to very subtle behavioral cues of conspecifics and humans. These socio-cognitive capacities can impact human-animal interactions during management practices and introduce ethical considerations on how to treat livestock in general. We emphasize the importance of gaining a better understanding of how livestock species interact with their physical and social environments, as this information can improve housing and management conditions and can be used to evaluate the use and treatment of animals during production.