Multiplying by a cosine (or a sine) and by a low-pass filter it is possible to extract the component in phase (or in quadrature). Then there is only an ASK demodulator and the two flows of data are merged back.
In practice, there is an unknown phase delay between the transmitter and receiver that must be compensated by synchronization of the receivers local oscillator (i.e. the sine and cosine functions in the above figure). In mobile applications, there will often be an offset in the relative frequency as well, due to the possible presence of a Doppler shift proportional to the relative velocity of the transmitter and receiver. Both the phase and frequency variations introduced by the channel must be compensated by properly tuning the sine and cosine components, which requires a phase reference, and is typically accomplished using a Phase-Locked Loop (PLL)