Compound sentences contain two or more independent clauses. They can be joined with a comma and a coordinating conjunction, or a semicolon plus a comma after the coordinating conjunction.
In the example sentence, the clauses separated by a comma and a coordinating conjunction are independent because they are both complete thoughts on their own: "Kenny, on the other hand, likes the view that he gets from the top of the mountain," and "he enjoys hiking in the forest."