How to create a program that controls the speed of a servo using a potentiometer using arduino?

Hello
Well, I think you need a timer, based on the BLINKWITHOUTDELAY example of the IDE, to generate angle steps per time interval.