In short, Yamaha sells a music synthesizer IDE called Vocaloid, and one of its features is that you can add lyrics via voice synthesizer packages, and then control the tune, vibrato and whatnot. Several 3rd parties sell voice packages for Vocaloid, and usually they were just given names to distinguish them, but a company called Crypton made a voice package called Hatsune Miku, and marketed it along with visual assets and a minimal backstory.
Importantly, they released the character (not the software) under remix-friendly licenses that encourage (noncommercial) reuse, so fans sort of took Miku and made her their own in a very Gibsonesque "Idoru" sort of way. As such, the difference between Miku and bands like Gorillaz or similar is that here there's no particular artist behind the scenes. The company who owns Miku's copyright just makes software; the music comes from fans.