I am assuming your code turns until it reaches the target angle and then shuts the motors off. You are overshooting because the robot has momentum and continues to spin after the motors stop receiving power. To make it turn to an exact angle, you need a PID controller, which slow the robot down as it reaches its target angle. They can get fairly complex to tune optimally, but the concept isn't that hard to understand. Here are a few resources to get you started:
http://m.eet.com/media/1112634/f-wescot.pdf
http://wpilib.screenstepslive.com/s/...rs-pid-control