GOBLINS:
-cruel
-live in mountain
-eat anything
-greedy
TROLLS:
-cruel
-live in caves
-can't go out in daylight otherwise they will turn to stone
-eat anything
-big
-fat
-dumb
also both the goblins and the trolls caught the dwarfs and Bilbo.
These links will give you a chapter by chapter summary of the book, character analysis, plot and much more, so that you will be able to answer literary questions.
The trolls are comic relief. They are defeated and turned to stone by clever trickery.
The goblins are much more numerous and organized, and they are not funny at all. The protagonists are able to escape them (barely), but it takes much more power (Beorn in bear shape, and whole armies) to defeat them. They add danger and excitement to the book, not comedy.
(I do hope you have read the book, if you are writing about this!)