The deflector dish is a feature usually seen on Federation starships, facing foreward. The dish projects a force field ahead of the ship that deflects small debris out of the ship's path while it is travelling at warp speed. This field protects the ship from warp-speed collisions with micro-meteoroids and other small objects, since even interstellar dust could be harmful to the ship at such high speeds.
The starships of other major Star Trek civilizations usually do not have highly-visible deflector dishes, but they presumably have a less obvious mechanism that performs this function.
The defector dish can also function as a weapon. In TNG "Best of Both Worlds", the crew of the Enterprise modified the ship's dish to project a blast of high-frequency energy (at the cost of burning out the dish and draining the warp core), and similar feats have been seen on other occasions since then.
The deflector dish was used because it is apparently one of two systems on a Federation starship that can utilize the full power output of the ship's warp core, the other being the warp engines themselves. The modified deflector dish was able to channel this power into a beam at controlled frequencies, allowing them to throw "more power than our phasers and photon torpedoes could ever provide" at the invading Borg Cube.