Genes are specific sequences of DNA that code for traits. The trait might be hair color, eye color, dimples, or a hitchhiker's thumb. That's only naming a few though. There are thousands upon thousands of traits with corresponding genes in the body.
Your DNA sequence is long. It contains about 3 billion base pairs. If you read one base pair per second, 24 hours per day, 7 days per week, it would take you over 90 years to read that code.
Your body divides that long code into more manageable segments. Those segments are called chromosomes. As a human, you have 23 pairs of chromosomes. 46 total. Each chromosome contains individual packets of genetic information. Those packets are genes - short sequences of DNA and small sections of a chromosome (since chromosomes are made of DNA). The attached picture should help.
Heredity is the study of genetics. Genes determine who we are and how are we similar to our parents. Genes determine our traits or physical characteristics that are inherited from our parents or family member. All living things including fungi go through the process of heredity.
Living things are comprised of cells. Genes are tiny biochemical structures inside each cell and contain a chemical called DNA(deoxyribonucleic acid).
The following attached venn diagram will help understand the concept of genes, heredity, DNA