Some people are gifted (or skilled) to know how to write the music they have in mind to the score sheet which is called the music score. It is that code with staff and notes that when someone who can understand the code plays it on the keyboard or piano, the planned tune and timing will be rendered.
Some people can only hum and sing and even play the piano without formal education but cannot put their composition on paper. Piano keyboard controllers is the solution to this problem. What you play can be recorded and you can simply print your score out.