How to convert angles to motor speed

"Baby steps" in this process would necessarily include a fairly complete understanding how a very simple 1D PID controller works, for example, a temperature controller. Then you might start thinking about writing a quadcopter flight stabilizer.

What have you done so far?

Are you aware that there are open source flight controllers, for example Ardupilot?