Generally speaking the meaning's the same, but as Peachey pointed out the grammar's different: I would prefer +N [or] + 'to V'; I would rather + V
I would prefer to come later
I would prefer the red car
I would rather come later
Fun fact: you can use "I would rather" (but not "I would prefer") in an exaggerated way to express how strongly you feel, eg. "I would rather die than leave her!"; "I would rather lose all my money than give that dishonest shopkeeper one single dollar!" ;-)