The process by which genes are turned on and off, and how this affects an animal's development and the traits it expresses.