“Thy will be done, on earth as it is in heaven” is the third petition of the Lord’s Prayer.
The will of God is used in two senses in scripture: God’s secret will (that is, his counsel or decrees by which he foreordains whatever comes to pass) and his revealed will (that is, his precepts or commands).
The secret will of God is sometimes called the decretive will. God’s decretive will cannot be known except as it unfolds in the events of providence or is revealed through special revelation, as in the prophecies of scripture.
The secret things belong to the LORD our God, but the things that are revealed belong to us and to our children forever, that we may do all the words of this law (Deut. 29:29).
The decretive will of God cannot be successfully opposed or resisted (cf. Psalm 115:3; Dan. 4:35; Acts 2:23; Eph. 1:11).
I am God, and there is no other; I am God, and there is none like me, declaring the end from the beginning and from ancient times things not yet done, saying, “My counsel shall stand, and I will accomplish all my purpose” (Isaiah 46:9–10).
[God] has mercy on whomever he wills, and he hardens whomever he wills. You will say to me then, “Why does he still find fault? For who can resist his will?” (Rom. 9:18–19).
There is also God’s preceptive will; that is, his precepts or commands. God’s preceptive will is made known in scripture.
Unlike God’s decretive will (which cannot be successfully resisted), the preceptive will of God is constantly resisted and opposed by rebellious humanity (cf. Matt. 7:21; 12:50; 21:31; John 6:38; Heb. 13:20–21).
The third petition of the Lord’s Prayer has in view both the secret will of God and his revealed will. As J. G. Vos says,
The third petition … refers both to the revealed will of God and to the secret will of God. We are to know and do the revealed will of God; we are to submit cheerfully to the secret will of God, that is, to the events of God’s providence. Thus the revealed will of God requires us to obey the Ten Commandments, to love God and our neighbor, etc., while submission to the secret will of God means that we will endure suffering, disappointments, hardships, bereavements, etc., patiently and without murmuring or rebelling against God.
With regard to the revealed will of God, when we pray “Thy will be done,” we request, says Thomas Vincent, that “ourselves and others, who naturally are dark and ignorant of his will, may, by his Word and Spirit, be enabled to know and understand it” (cf. Eph. 5:17; Col. 1:9–10; Rom. 12:2).
We also request that “ourselves and others, who naturally have in our hearts an enmity against God’s law, might be inclined and enabled to obey and do whatever it is the will of God to command” (cf. Rom. 8:7; Psalm 119:4–5, 35–36; 143:10).
With regard to the secret will of God, when we pray, “Thy will be done,” we request, says Vincent, “that ourselves and others might have compliance of will with the will of God, so as thankfully to accept merciful providences, and patiently submit unto afflictive providences” (cf. Luke 1:38; Acts 21:14; Matt. 26:39, 42; Luke 22:42; Heb. 5:7–8; 2 Cor. 12:8–9; Matt. 8:2).
“Thy will be done” is a prayer of submission or a prayer of dedication. It prays that God will accomplish his purposes, and that we will accept his providences, and also that we will obey his precepts.
 Johannes G. Vos, The Westminster Larger Catechism: A Commentary (Phillipsburg, NJ: P & R, 2002) 233.
 Thomas Vincent, The Shorter Catechism Explained from Scripture (Edinburgh: The Banner of Truth Trust, 1980) 87.