Magic genes are portions of human DNA that determine whether a person will have magical abilities. Those people born with the genes active are witches and wizards, while those who are not are Muggles or Squibs.
Magic genes are described as being "dominant and resilient." Squibs, while unable to use magic, are often still able to function within the wizarding world to a limited degree. The descendants of squibs who instead integrate into the Muggle world and marry will usually be Muggles, although the magical abilities occasionally resurface in later generations producing a Muggle-born witch or wizard.
Behind the scenes
According to J. K. Rowling, nobody knows where magic comes from. Therefore, it is unknown whether or not the ability to use magic is solely biological, stemming from unknown biological processes, or if magic is an external force that wizards are merely genetically predisposed to connect with.
Since Voldemorts ability to use magic survived with his soul, it can be assumed that magical ability has a connection to the soul. Further evidence would be Harry Potter's ability to speak Parseltongue while being a horcrux.
J.K. Rowling stated that she had considered having Dudley Dursley have a magical child in the epilogue, and see them off to Hogwarts at Platform 9¾ at the same time as Harry and his family. She decided against this, however, stating that any latent wizarding genes would never survive contact with Uncle Vernon's DNA. The Dursleys are most likely homozygous Muggles for the reasons mentioned above.