The purpose of this paper is to study the topic of prompt engineering, which serves as a valuable tool for teachers in creating optimal prompts that effectively enhance students' learning experiences with ChatGPT. This paper explores a variety of strategies related to prompt engineering. These strategies include assigning specific roles to ChatGPT, clearly defining objectives, applying constraints, utilizing structural prompt formats, refining answers through dialogues, and integrating practice exercises. Moreover, this paper specifically delves into relevant approaches to prompt engineering in the field of education, such as close question prompts, open question prompts, role-playing prompts, and Socratic prompts. It also presents the outcomes derived from a comprehensive survey conducted to assess teachers' attitudes towards the implementation of prompt engineering with ChatGPT. The collected data indicates that prompt engineering significantly contributes to the enhancement of the learning experience. This is achieved by tailoring prompts to suit individual needs, fostering greater engagement, promoting critical thinking skills, and facilitating collaborative and interactive learning environments. The findings of this study hold significant practical implications for educators. By effectively implementing prompt engineering strategies, teachers can fully harness the potential of ChatGPT to enhance students' learning experiences. By customizing prompts to individual students, educators can foster engagement, stimulate reasoning, and facilitate collaboration among students.