Determining how to make a servo respond to a changing variable

I'm new to coding and using arduino. I am trying to make a Line following robot for my high school engineering class and I have the code to tell the sensor to sense for certain values and show me those values but I don't know how to use those values to tell my servos how to move. If anyone could help that would be much appreciated.

I have the code to tell the sensor to sense for certain values

I seriously doubt that you can tell the sensor what values to sense. The sensor, whatever kind it is, senses what IS, not that you want to be.

but I don't know how to use those values to tell my servos how to move.

What, EXACTLY, are you sensing? How, EXACTLY, do you want the servos to move?

The answer to how to get the the servo to move is different if you are measuring the temperature in a pan, with the servo moving the pan towards or away from the source of heat, versus measuring the distance from a line and making the non-really-a-servo change speed in relationship to that distance.

You have some code that does something. It produces some values. But you're the only one that knows what it is or they are.

How do you expect us to help with code we can't see using values we know nothing about?

Steve