Forrest Gump speaks to a woman:
Forrest Gump: My mama always said life was like a box of chocolates. You never know what you're gonna get.
What does "get" refer to? Is it type of chocolate?
It refers to the wrapped chocolates in a box with an assortment of different types. When you reach for one, it could be any one of the different types. Of course, the point of the comparison is that you don't know what is coming next in life - you don't know what you will get from life or from the box of chocolates.
The sentence is
[you] [never know] [what you're gonna get].
The object "what you're gonna get" is a content clause (noun-like clause)
You understand "You are going to get (something)". The something that you are going to get is "what you are going to get".
So in the content clause, the object of get is the pronoun "what" and from context the word "what" refers to "a chocolate"