Particle で has a lot of meaning. I just explain two of them.
1. tool/method(by, with, in) わたしはくるまで行きます。I go by car.
2. place of action (in, at) こうえんでこどもたちがあそんでいます。Children are playing in the park.
*be careful that you can't use で for the place of existence or the place of destination.
こうえんでこどもたちがいます(incorrect) こうえんでいきます(incorrect)
<にほんでいきます>---日本で行きます?日本で生きます?
If you want to say 'somebody goes(行く) to Japan', this is not a correct sentence.
If you want to say 'somebody lives(生きる) in Japan', this is a possible expression although 日本で生活します(にほんでせいかつします) is more frequently used.