Okay, I also learned about it, you get them by collecting Totem Stickers, collectibles similar to Zygarde Cells, that are scattered across the Alola Region. There are over a hundred stickers, and at certain amount points, Samson Oak will call you to meet him, when you do he will give you a Totem Sized Pokemon.
Number of Stickers for Reward.(US reward on the left, UM Reward on the right)
20 Stickers Gumshoos Raticate
40 Stickers Marowak Araquanid
50 Stickers Lurantis Salazzle
70 Stickers Vikavolt Togedemaru
80 Stickers Mimikyu Mimikyu
100 Stickers Ribombee Kommo-o
Also see this link for the Sticker Locations, it is also my Source
Also, here's all that's actually different between a Totem Pokemon and the regular version, They're BIGGER, they have bigger sprites, and a different height and weight, this effects the moves: Grass Knot, Low Kick, and Heavy Slam.