〜にいく
When used as 〜Direction+行く, it means means that you go somewhere to do an action.
僕は一日に3回散歩しに行く I go to do a walk three times each day.
掃除しに行く。 I go to do cleaning.
〜ていく
implies you go somewhere after having completed the action
ワインを買っていくよ I will buy wine and go (there).
or when something will be happening from some point onward

勉強していく I will study from now on.

10月からドイツ語を勉強していきます I will study German from October onwards.