  Let $R$ be a semisimple ring. A pair $(A,C)$ is called almost-Koszul if $A$
is a connected graded $R$-ring and $C$ is a compatible connected graded
$R$-coring. To an almost-Koszul pair one associates three chain complexes and
three cochain complexes such that one of them is exact if and only if the
others are so. In this situation $(A,C)$ is said to be Koszul. One proves that
a connected $R$-ring $A$ is Koszul if and only if there is a connected
$R$-coring $C$ such that $(A,C)$ is Koszul. This result allows us to
investigate the Hochschild (co)homology of Koszul rings. We apply our method to
show that the twisted tensor product of two Koszul rings is Koszul. More
examples and applications of Koszul pairs, including a generalization of
Fr\"oberg Theorem, are discussed in the last part of the paper.
