用ing形式 the phrase acts as a noun
用to do 形式 the phrase acts as an adjective
例:
Winning is not the goal in this game.
胜利不是这个游戏的最终目的。
(在这里 winning 起 名词的作用 即胜利)
To bake a good cake, first you need the right ingredients.
要考蛋糕,首先你需要相应的配料。
(在这里 To bake a good cake(to do 形式)起 动词的作用 即要考蛋糕)
参考资料:Language Power - Book H