In a pot over medium heat, whisk together milk, flour, and sugar until it comes to a boil (about 5 minutes).
Boil, whisking intensely, for about a minute until thickens.
Turn off stove and transfer into a mixing bowl. Let cool, and put in the refrigerator for about 30 minutes. Let butter sit at room temperature to soften.
Beat in vanilla and room-temperature butter. The icing should be spreadable/pipeable now. If not, it likely did not cool enough and you can refrigerate it again. Just whip it immediately before use.