What is the meaning of [bad apple]

Tom is really a bad apple (a trouble making or dishonest person).