Extrasolar Planets: Formation, Detection and Dynamics