The particle で (DE) is used to mark a location where an action takes place. It's important to understand the difference with に (NI), which is used simply to mark a location with no specific action taking place.
私は大学で医学を学んでいます。
Watashi wa daigaku de igaku o manande imasu.
I study medicine at university.
2.
で (DE) can be used to describe the material used to make something. It means "made of, etc." Make the subtle difference with "made from" (raw material) for which から (KARA) should be used.
この人形はプラスチックでできている。
Kono ningyou wa purasuchikku de dekite iru.
This doll is made of plastic.
3.
The particle で (DE) can express the means of doing something or going somewhere. A good translation is "with" (with a pen), or "by" (by train). Don't make any confusion when trying to translate "with someone". A person is not a means of doing something, but means "together with someone" in Japanese. In that case, use と一緒に (TO ISSHO NI).
私は仕事にバスで行きます。
Watashi wa shigoto ni basu de ikimasu.
I go to work by bus.
Note that the means / the cause can have a negative result, too. で is in fact also used to express the means by which something negative occurs. In that case, で can be thought as a way to explain a reason.
停電で真っ暗になった。
Teiden de makkura ni natta.
It became dark because of a power failure.
4.
The particle で (DE) can be used to express the length or scope. This is how to translate "within" for example.
ビデオゲームを3時間でクリアーした!
Bideo geemu o sanjikan de kuriaa shita!
I finished the game in three hours!
The Japanese sentence keeps the idea of a means: "With 3 hours, I could finish the game!"
5.
In a superlative structure (the most / the less + adjective), で (DE) is used to indicate the group in which the elements are compared.
この選手はチームで一番若いです。
Kono senshu wa chiimu de ichiban wakai desu.
This player is the youngest of the team.
6.
で (DE) marks the moment when something is expected to occur.