You’ll need to use both spectrums to pick out information and piece them together to identify the compound, similar to a puzzle. First, you could use the infrared spectrum to identify which functional groups are present by matching what peaks you see to the known peaks of certain functional groups. If, for example, you have propanol, you may need to identify whether it is propan-1-ol or propan-2-ol (a secondary or a primary alcohol) and you may use the mass spectrum to observe which fragments are present. The c-c bond is weaker when one carbon is bonded to the -OH group therefore for a primary alcohol you may identify fragments that could make up CH3CH2 and CH2OH, and for propan-2-ol, a fragment of CH3 and CH2OHCH2. There are certain things to generally look for in both spectrums and once you identify them you can piece the compound together.