This stage helps to insert the shuttle (orbiter) into the planet's orbit to carry out the mission.
The orbiter's velocity and altitude are varied depending upon the mission's requirement. Two thrusting periods help to boost the orbiter to the orbit. The first thrusting period is referred to as OMS-1 and boosts the orbiter to the desired apogee (farthest point from the earth); the second thrusting period is called OMS-2 and it circularizes the orbit.
The optimal orbital altitude (the altitude that satisfies mission and payload goals) is determined before launch. To achieve the orbit computer maintains an accurate targets and initiates maneuvers to specified attitudes and positions. These activities are planned with several constraints in mind, including fuel consumption, vehicle thermal limits, payload requirements and rendezvous/proximity operations considerations.