1.To chasten ourselves:
Dan 10:2 In those days I Daniel was mourning three full weeks.
3 I ate no pleasant bread, neither came flesh nor wine in my mouth, neither did I anoint myself at all, till three whole weeks were fulfilled.
Here, Daniels way of mourning or chastising himself was by avoiding certain kinds of luxurious/pleasant foods.
2. To set our heart on a purpose
God responds to Daniels fasting:
He sent His Angel:
V. 12 Then said he unto me, Fear not, Daniel: for from the first day that thou didst set thine heart to understand, and to chasten thyself before thy God, thy words were heard, and I am come for thy words.
It's a continuous supplication for a purpose, for as long as the period of the chastising lasts.