What are two general ways an animal can adapt?