The Maxwell operator in a 3D cylinder is considered. The coefficients are assumed to be scalar functions depending on the longitudinal variable only. Such operator is represented as a sum of countable set of matrix differential operators of first order acting in $L_2({mathbb R})$. Based on this representation we give a detailed description of the structure of the spectrum of the Maxwell operator in two particular cases: 1) in the case of coefficients stabilizing at infinity; and 2) in the case of periodic coefficients.