I know that we get half of our genes from each parent, but does it necessarily mean we get 1/4 of our genes from each grandparent? Or is it possible that we might get say 30% from one grandparent, 20% from other, 15% from another, 35% from another?
I have answered a similar question before: "How many genes do we share with our mother?".
It is not that you "get half your genes" from each parent, and thus a quarter from each grandparent, it is that you inherit the versions of the genes (we all have the 'same' genes).
The method that determines which traits are inherited from each parent by the offspring is known as homologous recombination, and this process is (essentially) random, and thus you end with ~50% of your traits (the alleles of the genes) from each parent, and ~25% from each grandparent, so you are right in this respect.
This is, however, a generalization; due to the chance nature of the recombination it is entirely plausible that you may inherit more traits from one grandparent in comparison to another, but this is unique to each individual (with the exception of course of genetically identical twins).
I agree with the person above. But it might be more correct to say we get 1/4 of our total DNA from each of our grandparents, because though the genes are really important to code for specific proteins, there are tons of non-coding DNA in between them. In fact, 98% of our genome is non-coding! Although we are discovering awesome novel functions for this DNA slowly but surely. But it is important to think of it as 1/4 of your DNA and not genes because it is in this non-coding DNA where a lot of mutations can occur, and these mutations are what we inherit and make things like DNA fingerprinting for forensic analysis possible, like in CSI.
I just wanted to add three more thoughts:
Though it is true that 1/4 of your DNA would come from each grandparent, that is only true for your autosomal genes, not your necessarily for your sex chromosomes. The X chromosome does recombine regularly in the mother, but in the father the X and the Y do not recombine. (Actually I think part of the Y can recombine, but for the most part, the sex-determining part of the Y and its associated genes stay completely intact). This means that if you are a male, your father, and his father, and his father all share the same Y chromosome.
Additionally for the women, because the woman makes the egg, and thus all the early embryonic organelles and RNA's, the woman donates the mitochondrial DNA, which has its own sets of genes that are really important and have been linked to many diseases. So every child of a woman, shares their mother's mitochondrial DNA, as she shares her mother's and her mother's mother, etc.
If ~1/4 of our DNA comes each grandparent, then 1/8 of your DNA comes from each great-grandparent. So then 1/16 of our DNA comes from each great-great grandparent, which are your grandparent's grandparents. And thus it continues exponentially upward. The result is that there comes a point where your ancestors have contributed so little to your actual DNA, that it becomes almost negligible. So if you are an American, who most likely has ancestors from all over the world, even if you have 1 great-great-great-great grandparent who was a French immigrant while the rest of your ancestors were all British, the French DNA is only 1/64 of your total DNA. So even if you are a complete mix, there comes a point where so many different people have contributed to you being you, that you can establish a cut-off and just say, 3/4 of my ancestors were born in America, I'm American!
There is a phenomenon known as genomic imprinting where the allele of the gene would only get expressed if it is passed on from the father (e.g. IGF2). This means that although the same genes get passed on from both your father and mother, only the copy from your father will get expressed. Thus, although you get 50% of your DNA from your parent (and probablistically speaking 25% from your grandparent), the same gene can be deferentially expressed depending who you get them from).