N5
で
With, By (using)
みんなでレストランに行く。
We all go to the restaurant together.
Explanation
「で」 shows the means, tool, material, language or vehicle you use: 「電車で行く」 (go by train), 「箸で食べる」 (eat with chopsticks), 「日本語で話す」 (speak in Japanese), 「紙で作る」 (make from paper). The way you pay also takes 「で」: 「カードで払う」.
Mixed up with
Walking does not take 「で」; say 「歩いて行く」 or 「歩いて来る」, never 「歩きで行く」 or 「足で行く」. Vehicles (train, car, plane, bicycle) all take 「で」.
The 「で」 in 「図書館で勉強する」 marks where it happens; the 「で」 in 「鉛筆で書く」 marks the tool, which is a different job.