I have a pet tree
I have a pet tree...
It's like having a pet dog but the bark is much quieter.
This joke is a pun. The pun is centered around the word bark. The bark of a tree is its outer layer, but the bark of a dog is a vocalization that it makes when it is excited, angry, or happy. They are not equivalent in any way, and that dissonance is where the humor comes from.