This explains it much better than i did:-
spoonerism
n
(Linguistics) the transposition of the initial consonants or consonant clusters of a pair of words, often resulting in an amusing ambiguity of meaning, such as hush my brat for brush my hat
[C20: named after W. A. Spooner (1844–1930), English clergyman renowned for slips of this kind]