Forming Planets via Pebble Accretion