Microscopic mechanisms in multiferroic materials