Phase separation and pattern formation