Actually, both concepts are related to Data Encryption. it Depends on the status of Data if it's stored or moving from communication media.
So Data-In-Flight is nothing but Data is moving through a communications media such as copper wire or any other form cable.
and Data-in-rest is data which is stored or written to any media storage like Disk, Tape etc.