The Pokemon Sun and Moon website describes it as "UB-01's body is composed of a glass-like substance."
Glass is a mineral made from the same stuff as sand and rocks, thus the Rock typing.
UB-01 is a parasitic beast, that uses neurotoxins to affect its hosts, thus the Poison typing.
Overall...