If a volcano erupts what type of rock will form?

It will form extrusive igneous rock. Beyond that they exact type will vary.