Answer:
Both granite and rhyolite are the same genetically, however, the difference is that one is volcanic and the other is plutonic. Volcanic or extrusive igneous rock refers to a rock, which dissociates via the surface to crystallize close to or on the surface of the Earth leading to the formation of a fine-grained rock, one of the examples of this is rhyolite.
On the other hand, a plutonic igneous rock is the one, which crystallizes deep in the crust, and are featured by the formation of coarse-grained rock or comprising large crystals. These rocks are also known as intrusive rocks, and granite is one of the examples.