Obviously, Hatsune Miku is not a real person. Her voice is synthesized through the usage of a program called VOCALOID, the original version of which was released by Yamaha in 2003. VOCALOID is a music-making tool designed to allow users to assemble songs with not just synthesized instruments but synthesized voices as well.
The voices are created through the use of voicebanks, massive collections of simple sounds from a particular language like syllables, phonemes, and so on. In the VOCALOID Editor, you string together both vocal sounds from the voicebank and a melody, and it turns into music.
There are actually quite a few voicebanks available for VOCALOID; Hatsune Miku is just one of the Japanese-speaking ones, and she wasn’t even created by Yamaha. Miku was the second generation of Japanese-speaking voicebanks created by a third-party company, Crypton Future Media. There are first- and third-party voices in various languages, including English, Spanish, Chinese, and Korean, as well as different voice tones for various genres of music. If you’ve got the right voice bank and some musical know-how, you can make pretty much any kind of song from scratch.