Genetics explores how traits are passed down from parents to offspring, the mechanisms behind inheritance, and the variations that occur within and across generations.