Inherited traits, like for example, your eye color, do come from your genes. However, there is a lot of luck involved too. If one of your parents had blue eyes and the other brown, there is a percent chance of having blue or brown eyes, but the chance is higher for brown.
Other factors include the environment around the DNA that can influence it. A cosmic ray from outer space can hit a piece of DNA and cause random changes too which is called a mutation. Scientists believe that this is a major way we evolved (if you believe in evolution), so a fish might have had a chemical or outside force cause a part of their DNA to instantly change enough so they got legs and could eventually walk, which has nothing to do with inheritance.