Before starting to transmit data and when the receiver uses coherent detection, a known pilot sequence is used at the beginning of each coherence time to estimate the channel.
Let the received signal over flat block fading channel be
$$y = h\,x + n$$
where $h$ is the channel coefficient, $x$ is the transmitted symbol, and $n$ is AWGN. In the above equation, when $x$ is known, the received signal signal is a noisy version of the channel coefficient. A simple way to estimate the channel is to use zero forcing. Mathematically
More robust estimation schemes exist, but this is the idea behind channel estimation. At the beginning, the transmitting symbols are known but the channel is not, in the remaining part of the coherence time, the transmitted symbols are unknown (at the receiver), but the (estimated) channel is known.