Place your hand at the place where you feel pain in your body and say Bismillah (in the name of Allah) three times and seven times A'udhu billahi wa qudratihi min sharri ma ajidu wa uhadhiru (I seek refuge with Allah and with His Power from the evil that I find and that I fear).
أَنَّهُ شَكَا إِلَى رَسُولِ اللَّهِ ﷺ وَجَعًا يَجِدُهُ فِي جَسَدِهِ مُنْذُ أَسْلَمَ فَقَالَ لَهُ رَسُولُ اللَّهِ ﷺ ضَعْ يَدَكَ عَلَى الَّذِي تَأَلَّمَ مِنْ جَسَدِكَ وَقُلْ بِاسْمِ اللَّهِ ثَلاَثًا وَقُلْ سَبْعَ مَرَّاتٍ أَعُوذُ بِاللَّهِ وَقُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ وَأُحَاذِرُ