The mechanism of action of antimicrobial peptides (AMPs) has been investigated using MD simulations. The interaction of three AMPs, magainin, melittin and defensin with model phopholipid bilayers has been simulated. The peptides are seen to interact with the phosphate moieties and induce large fluctuation in the position of these moieties along the membrane normal. Subsequently, nanometer-sized toroidal pores formed spontaneously in the membranes, the lipid molecules bending inwards to line the water channel. The peptides did not insert fully into the pore and the maximum in the density profile was at the head-group region. In all cases, peptide aggregation was found to be crucial to induce pore formation, though the number of peptides required varied for the different AMPs. No large changes were observed, prior to pore formation, in the bilayer properties such as thickness, area-per-lipid and order parameters. The study allows a detailed understanding of the action of AMPs.