Controlling the speed of a dc motor?

I'm confusimicated here....

The thread subject and first post talk of dc motor, yet the OP posts code for a servo in #10

#include <Servo.h> 
#include <IRremote.h>

int RECV_PIN = 11; 

Servo myservo;  // create servo object to control a servo 

// etc etc ......