As described in the Torah (Exodus chapter 17), Amalek attacked the Jews when they left Egypt. They ambushed the weakest members of the nation, who were straggling behind because of exhaustion and hunger. This wasn't just an attack on the Jews, it was an attack on God Himself. The repercussions of this event go far beyond the attack itself. After the ten plagues and the exodus from Egypt, the nations of the world were in awe of what God had done. By daring to attack the Jews, Amalek set a very bad precedent. The allegory used by the Midrash (cited by Rashi on Deuteronomy 25:18) is like the first person to jump into a hot tub. He may be burned but he cools off the water for those who follow. That's what Amalek did with their attack.
We are meant to remember Amalek's cowardly assault both mentally and verbally. This is one of the "six remembrances" that we should recall daily. We fulfill this mitzvah through the reading of parshas Zachor in the Torah. (The custom is to read it close to Purim, as Haman was an Amalekite.)
The underlying principle of this mitzvah is that Israel enjoys special providence from God. Those who oppose Him will meet their downfall, as Amalek did.
This mitzvah applies in all times and places. It is discussed in the Talmud in tractate Megillah (19a-b and 29a-b) and is codified in the Shulchan Aruch in Orach Chaim 685. This mitzvah is #189 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos and #76 of the 77 positive mitzvos that can be observed today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.