Teacher: It means learning from the teacher.
Yi: refers to barbarians. At that time, the Qing Dynasty considered itself a powerful country in China and called the western countries barbarians.
Long skill: refers to their specialty, that is, the advanced industries, weapons and so on of western powers.
Control: control, processing, restriction, etc.
Therefore, the whole sentence probably means learning to manufacture and use foreigners' advanced technology (weapons) to combat and restrict foreigners.
This sentence comes from Wei Yuan's Atlas of the Sea. On how to resist foreign aggression and effectively attack invaders, Wei Yuan put forward this famous saying: "Learn from foreigners and learn from them to control them".
This is the representative slogan of learning utensils from the west in the late Qing Dynasty.