Energy crisis and environmental issues have encouraged the adoption of electric vehicle as an alternative transportation option to the conventional internal combustion engine vehicle. Recently, the development of smart grid concept in power grid has advanced the role of electric vehicles in the form of vehicle to grid technology. Vehicle to grid technology allows bidirectional energy exchange between electric vehicles and the power grid, which offers numerous services to the power grid, such as power grid regulation, spinning reserve, peak load shaving, load leveling and reactive power compensation. As the implementation of vehicle to grid technology is a complicated unit commitment problem with different conflicting objectives and constraints, optimization techniques are usually utilized. This paper reviews the framework, benefits and challenges of vehicle to grid technology. This paper also summarizes the main optimization techniques to achieve different vehicle to grid objectives while satisfying multiple constraints.