On a graph, the Capital Allocation line (CAL) starts at the risk-free return and runs tangent to the minimum variance frontier for any group of risk assets.
On a graph, the Capital Market Line (CML) starts from the risk-free return on the y-int and runs tangent to the efficient frontier at the market portfolio.
Market Portfolio is portfolio representing the weighted value of all investible assets.
The idea is that all investors all investors agree to common expectations for all assets, i.e., expected returns, standard deviations and correlations. When there is only one sent of expectations there will be only one capital allocation line, called the Capital Market Line.
Since all the investors have the same expectations, they all are agreeing on similar composition of optimal risky portfolio, which is called the market portfolio.
The line equation for the CML is the same as the CAL and the slope coefficient is the Sharpe Ratio formula. CML is actually a special case of CAL.
Note that there is only one CML common for all investors, while there are unlimited CALs unique for each investor.