Can happen as an error in DNA replication or an organism's exposure to a mutagen (a chemical or physical factor that can kickstart changes in DNA; ex. UV radiation, the chemical in tobacco products, etc.)
Some are inherited as they can be passed down from parent to offspring (ex. hemophilia)