A coup d’état is the illegal overthrow of an existing government by people from within the country. When a given political party loses an election, that is not a coup d’état because the election was, presumably, legal. If one country invades another and topples its government (as with the US and Saddam Hussein) it is not a coup d’état because it was not carried out by people within the country. Finally, a coup d’état is something that happens quite suddenly. If there is a long civil war won by a rebel group (for example, if the Syrian rebels were to overthrow Bashir Assad), we do not call it a coup d’état.
The phrase “coup d’état” comes from French. It means a blow (coup) against the state (etat). We often see the phrase shortened down to just “coup.” If you hear of a “coup” against a government, it is the same thing as a coup d’état.