You see, Granny Smith is really Big Macintosh's mother. The two of them had a little redneck fun one night, and Applejack was born.
Since Applejack is Big Mac's daughter and Big Mac is Granny Smith's son, that would make Granny Smith Applejack's grandmother. And because they share the same mother, Big Mac and Applejack are also brother and sister.
It's probably best that you don't ask about Apple Bloom's relationship.