By definition a diastereomer is any stereoisomer that is not an enantiomer
Consider the possible optical isomers of 2,3-dichlorobutane.
There are two chiral carbons, so there are #2^2 = 4# possible optical isomers.
However, two of the structures are identical. They are the same meso compound. So there are only three isomers.
Both of the enantiomers are diastereomers.
In each case, the meso compound is not optically active, while its diastereomeric partner is optically active.
It is even possible to have diastereomeric pairs in which neither member is optically active.
Consider the pentose alcohols, ribitol
They are diastereomers of each other, but they each have an internal plane of symmetry.
They are both meso compounds, and they are both optically inactive.