I will present a survey of the main results about first and second order collective behavior models where repulsion and attraction are introduced through effective pairwise potentials. We will mainly focus on the stability of patterns and their qualitative behaviour. This question leads to sophisticated variational calculus issues about minimizing interaction energies. We also discuss continuum models for these applications leading to kinetic and hydrodynamic equations.