It depends which microcontroller.
You will need to make a delay of about 500 uS.
Then you turn on the signal pin for the servo --> call the delay --> turn off the signal pin
Repeat this a couple of dozen times a second.
For different angles, you could great a 8uS delay and loop it a number of times. This would be added onto the 500uS delay.
Using 8uS means you have the range of 0.5 - 2.5 mS in 256 steps.