Just do the drawing, it would definitely help.
The distance between you and the tree would be the base of a triangle, the height of the tree would be the height of a triangle, (and of course a line passing through where you are standing on the ground and the top of the tree would be the hypotenuse).
Since we are given the angle, we can use tan since tan (theta) is equal to opposite side (which we do not have, but want to find) over adjacent side which we have.
So:
tan(theta) = opposite/adjacent
let's say theta was 60 degrees, and your distance to the tree was 50 meters.
Then:
tan(60) = X/ 50 => X= 50 * tan(60) = 50 * sqrt(3) where sqrt(3) means square root of 3