There are other external forces but, in our experiment, the teacher mentioned only 2.
1.) The gravitational force.
Of course, we all know that gravity is the force that pulls as to the center of the Earth. It is also the reason why the pen hanging on the string tends to move downward if no force is stopping it.
2.) Tension force.
Tension force is applied when the pen was hanged using the string. The place where the string holds the pen is where the tension force is. The tension force balances the downward force of gravity that is why the pen remains motionless.