Are they based off of birds or sea hallucinations or what?
We're mostly reduced to speculation. The idea of supernatural females who use songs to enchant people is a traditional folkloric feature, which appears in ancient Greece also in the Furies, who use a binding song in Aeschylus' Eumenides, and the Sphinxes, who carry off people who have been enchanted by songs in Euripides' Electra. We get similar features in other countries' mythologies, which suggests it's much older than the Odyssey: for example, the Irish hero Bran encounters a mysterious woman who enchants his sailors with song as he's sailing west to the Isle of Joy.
Here's what Alfred Heubeck has to say in his commentary on the Sirens episode in Odyssey 12 about the hypotheses that have been advances about their origins:
The conclusions reached are varied: vampire-like souls of the dead or spirits embodied in birds (G. Weicker, Der Seelenvogel (Leipzig, 1902), opposed by Nilsson, Geschichte, 228-9, Gresseth, op. cit., 203-4); beings from the world of spirits, who delight the souls of the dead with their song in the after-life (Buschor, op. cit.; countered by J. Pollard, 'Muses and Sirens', CR lxvi (1952), 60-3); or even 'daemones meridiani', demons of the midday heat, who paralyse seamen, and so endanger their lives (K. Latte, 'Die Sirenen', Kleine Schriften (Munich, 1968), 106-11, criticized by Gresseth, op. cit., 209-10). One thing is certain: that both the conception and the portrayal of man-beast hybrids-besides the Sirens (birds with human faces) there are sphinxes and griffins-are influenced by oriental models (Nilsson, loc. cit.). This influence can be traced back to Mycenaean times. Cf. the fresco from Pylos, K. Blegen, AJA lxvi (1962), plate 40, 12. H. Miihlestein, ('Sirenen in Pylos', Glotta xxxvi (1957), 152-66) has plausibly suggested that the word Seirēmes (> -ēnes) is to be read in the Pylos Ta tablets; the heads of Sirens appear to be mentioned there also as ornamentation on thrones (Ta 708.2 se-re-mo-ka-ra-a-pi/Seirēmōn krahapphi, instr. pl.; the sg. appears at Ta 707.2, 714.2; cf. also E. Risch, SMEA i (1966), 53-69).
The upshot of all that is: "there are plenty of suggestions, but no one knows".
The piece by Gresseth that Heubeck mentions is a little long in the tooth (1970), but worth a read if you care to get it via JSTOR's "Register & Read" free access plan: the article is here, and it's in one of the journals eligible for "Register & Read". He comes to the conclusion that whatever they originally were, their winged nature is a key feature (i.e. unlike the depiction of "Sirens" in modern non-anglophone cultures, where "Siren" is often the modern word for "mermaid").
/u/rosemary85 has provided his usually excellent answer providing specific insight. The following excerpt from my Introduction to Folklore was actually inspired by these sorts of questions that appear frequently in /r/askhistorians. Determining the origin of a folk belief is maddening even when the material is more recent; unraveling the source for something from the ancient world is made difficult by an even greater extent. Here is what I have on this:
On the origin of the stories:
The answer to this question is somewhere between "we don't know" and "it's just what people do" – that is, they invent these sorts of stories. Several folklorists, including the late Alan Dundes and Jan Harold Brunvand, recognized an opportunity with recent urban legends to finally track down "the source," the point of creation, to better understand how stories originate. For the most part, they were unable to find the point/person of origin to any general degree of satisfaction. It is a maddening question, and much like the proverbial chicken and the egg, it isn't likely to be resolved.
People tell stories. People repeat stories. And as they repeat them, people modify stories, which sometimes results in the birth of new stories. There might have been some highly imaginative, creative people who invented stories at some point, but that sort of person has yet to be identified in the annals of folklore studies. Folklorists often asked renowned storytellers to tell a new story, to invent something that they had not heard. Without exception, these requests were refused by the storytellers who explained that while they repeated stories, they did not invent them. In general, it may be best to consider the possibility that the process of repetition and transmission is the source of much of the creativity that is evidenced in the international library of oral tradition.
One example may help shed light on the creative process: the Cornish droll tellers were known for their wild adaptation of the material they heard. Their counterparts in Ireland were the seanchaithe, professional storytellers who prided themselves in the faithful recitation of stories they had heard, as close to the original as possible. Perhaps in this, we can see the opportunity for new stories to be born, and indeed, Cornish oral tradition includes more than its fair share of distinct subtypes (i.e. variants) of legends and folktales, perhaps offering a hint as to how these things may come into existence.
And on whether there are real people or events behind legends, myths, and ancient gods:
When I see the posts like this asking about whether there were real people or events behind legends, myths, and/or the ancient gods, I respond with a number of observations. First, the idea that the gods and heroes of legend are based on real people had an early proponent in the Greek, late-fourth-century BCE writer, Euhemerus, giving his name to this approach to myth and legend: Euhemerism. Folklorists generally regard the idea that there was an actual basis for most oral tradition as barking up the wrong tree, because the original “real” event behind a story is usually elusive and searching for that core is a futile exercise. In addition, research into how stories began usually concludes that they emerge in a rather spontaneous way, typically without an actual incident to inspire them.
A few examples: the Classical Greek story of Perseus is an early manifestation of a widespread folktale, catalogued by the twentieth-century folklorists Antti Aarne and Stith Thompson as AT 300, “The Dragon Slayer.” Was there a proto-Perseus who rescued a maiden from some sort of extraordinary threat or perhaps from some sort of human sacrifice? It is hard to answer that question, but it is not hard to imagine how far back in time that proto-incident would have had to occur: AT 300 is spread throughout Eurasia. It was collected from cultures that could have no conceivable literary connection with ancient Greece, and yet the shared assortment of motifs in the numerous variants clearly show some sort of genetic, that is, historically-connected relationship. Would we need, therefore, to go back thousands of years before the first recordation of the Perseus story in order to find this proto-Perseus? It is much easier to understand that the folktale simply diffused and that one of its manifestations was in ancient Greece.
Now, let’s consider another example that has inspired a lot of spilled ink. A simple Google search for the “origins of King Arthur” provides more websites than one could easily read in a week. Was there a proto-Arthur? Perhaps. Maybe there were several. But what does that prove? Every society has remarkable characters, and it may be a natural process for these sorts of individuals to attract all manner of traditional stories that have nothing to do with the original inspiration of the cycle of legends.
So what do we have with Arthur? Was there a core source (or sources) for this legendary character? Let’s concede for the sake of argument that the answer is yes. Now, did this individual have a great warrior at his side who became ensnared by the leader’s wife in the fashion of Lancelot and Guinevere? That is more problematic since this type of story is also associated with Diarmuid and Grainne in the Irish court of King Finn and with the Cornish stories of Tristan and Isolde in the court of King Mark. One could even argue that it is the story behind Helen of Troy. In fact, it appears that this was a widespread type of story that became associated with various courts of historical legend. We cannot conclude that every great king had a queen who was attracted to one of his warriors and coerced him to take her away. This is simply a story that was attached to cycles involving great courts. In short, the further one goes back to find the “real Arthur,” the less the candidate (or candidates) look like the King Arthur who has been beloved for centuries. The proto Arthurs are not really King Arthur. They may be seeds but they look nothing like the tree that would grow over the centuries. We do not hold an acorn and say “Ah, I have in my hand a mighty oak tree.” It is not yet a tree. It is a seed. And the two look very different even if they are genetically linked.
One more example: there is a widespread legend told by countless families of the ghostly appearance of a loved one in anticipation of news that the individual died. This became a popular tradition in post-Famine Ireland because so many relatives lived in North America or elsewhere. But it is frequently told by all sorts of people internationally. So we can ask, are there real-life, actual inspirations for this legend? That is, do the spirits of the dead actually come to visit loved ones? Well, how the hell should I know? To paraphrase a famous line from the television show “Star Trek,” “Damn it Jim, I’m a folklorist, not a ghost hunter.” And I have no intention of becoming a ghost hunter. It doesn’t matter what is behind stories so much as it does that people tell these stories. I’m in it for that part of the game; I consider stories as they are told over time, to gain from that material some insight into the past, into culture, and into the human condition. I am a folklorist. And with that, my plate is full.