Before we get into Gregor Mendel and Mendelian Genetics, you need to understand the difference between body cells (or somatic cells) and gametes.
Germ cells are located in the ovaries and testes and develop into gametes. Gametes are the egg and sperm cells in your bodies, and contain DNA that can be passed to offspring.
Body cells contain DNA, but it is not the DNA that is passed to offspring. Both types of cells also contain chromosomes. Somatic cells contain 46 chromosomes (23 pairs) and gametes contain 23 chromosomes.