Most people think Mister Ed "talked" because the film crew applied peanut butter to his gums. However, Producer Alan Young admitted in 2004 that he had made up that story himself, and explained that they employed a much more sinister method: marionette-like nylon strings attached the horse's lips.
And you really don't want to know how they got him to whinny.

(Thanks for sending, Bridget!)