A counterparty is a person which whom a market participant (such as a stockbroker) makes a trade. Typically, each participant is the other's counterparty for any trade made. An important exception to this is where a central counterparty exists.
There are regulatory and risk issues associated with dealing with counter-parties. From a regulatory point of view a firm has few duties to a counterparty other than fulfilling any agreements entered into.
Counter-party risk is an important issue due to both the significant amount of exposure one participant can have to another, and because of the potential systemic risk that arises from this. For this reasons markets need mechanism such as central counterparties and delivery vs payment to control the risk.