Pattern formation in systems with competing interactions