When doing damage, your move's type. But you will get an additional 25% more damage if your Pokémon has the same type as its move is (STAB).
If you have a grass Pokémon, for example Exeggutor but you have 2 Psychic moves and you attack against water (weak to grass), you will get no bonus for your attacks (aside from STAB) because your attacks are both psychic and not grass types.
However, to incoming damage both your Pokémon's types matter but your moves do not matter. An Exeggutor (Grass/Psychic) will take 1.25 x 1.25 = 1.56 extra damage from Bug attacks because both Grass and Psychic types are weak to Bug.
Hope this clears it up for you, if not, ask me to explain in more detail :)