Chainline refers to the alignment of your chain between the front and back gears. Drivetrains are designed to work together within certain dimensions on a frame. You can mix and match, but risk finding incompatibilities. It can be very tricky to buy the right component to fix alignment issues, but you can start with understanding the variables and how to measure what you have.