I've noticed that in their prayer, some people after reading tasbeeh and du'a, they do a sajdah where they turn their heads aswell. Can you please explain to me what is said and exactly how is it done.

Sajdah Shukr
There’s no particular way of doing it other than going in sajdah and saying Shukran lillah 10 times or 100 times.