The answer to this famous riddle is, of course, that neither one is made of cheese.
Actually, this riddle is designed to be nonsensical, and according to its author, Lewis Carroll, he never intended for there to be any real answer to the question: “why is a raven like a writing desk?” The entire point of the riddle is that it has no answer, although numerous people have come up with creative interpretations of the riddle.
This question is posed in Alice's Adventures in Wonderland, in a scene with Alice, the Mad Hatter, and the Dormouse at the famous Tea Party. Alice is informed that riddles are being exchanged, and the Mad Hatter asks “why is a raven like a writing desk?” The guests attempt to puzzle the riddle out, and several pages later, the Hatter admits “I haven't the slightest idea.” The scene is meant to illustrate the topsy-turvy world into which Alice has fallen, with the whole book illustrating how confusing the adult world seems to children. When Alice asks about why they are wasting their time with riddles which have no answer, she's really asking a larger question about adults.
In an introduction to a later edition of the book, Lewis Carroll addressed the issue, saying “Because it can produce a few notes, tho they are very flat; and it is never put with the wrong end in front!” In the original preface, “never” was spelled “nevar,” which is “raven” backward. Carroll's pun was unfortunately lost to the red pen of a proofreader, confusing the issue of the riddle even further.
A number of people have come up with creative answer to “why is a raven like a writing desk.” The answer “Poe wrote on both” is popular, as is “they both stand on sticks” and “they both come with inky quills.” One wit responded with “because there is a B in both and an N in neither,” an answer which was meant to highlight the absurdity of the original question. (Saying it aloud might make it clearer.)
The answer to the question of is largely up to you. Many people like to come up with absurdist answers to the question, turning the strange riddle back on itself. Admitting that you have no idea is, the classic response, and the response given in the original text. However, you should certainly not allow tradition to dictate the answer, as that would spoil all the fun.
Incidentally, the correct format for the riddle is "why is a raven like a writing desk," not "how is a raven like a writing desk," contrary to any misprints you may have seen.