We prove that if omega(1) and omega(2) are moderate weights and B is a suitable (quasi-)Banach function space, then a necessary and sufficient condition for the embedding i : M(omega(1), B) -> M(omega(2), B) between two modulation spaces to be compact is that the quotient omega(2)/omega(1) vanishes at infinity. Moreoverwe show, that the boundedness of omega(2)/omega(1) is a necessary and sufficient condition for the previous embedding to be continuous.