Bosnians are Bosniaks, Serbs, and Croats plus minorities not in the main three constitute nations of that country. That’s the simplest answer. In Bosnia itself now Bosnian is not recognized as an ethnic term but rather a national one (properly Bosnian and Herzegovian) while Bosniak, Serb, Croat are actual ethnic terms. Bosniaks come from the “Muslimani” ethnicity of part of the Bosnian population during Yugoslavia. Bosniak, however, does have historical context and is often the term used to describe people from Bosnia both in medieval and Ottoman post-medieval times. 

Bosniaks will claim that Bosniak was always the term used for the people of Bosnia and “Croat” and “Serb” were introduced later to divide up the Bosnians along religious lines. Like most nationalistic claims, either its complete rubbish or there is some grain of truth there. Here there is a grain of truth insofar as Bosniak (Bosnjani) is historically accurate but it’s false to claim there was never any mention of Croats and Serbs until later. The conclusion is that nationalistic Bosniaks believe that almost all Croats and Serbs from Bosnia are actually Catholic and Orthodox Bosniaks ( or the Serbs there are assumed to be Orthodox ‘Vlachs’ too) but were brainwashed by 19th century nationalism to identify as Croats and Serbs. Bosniaks speak the Bosnian language, which according to most linguistic communities is an offshoot of Serbo-Croatian, but Bosniaks believe that Bosnian is its own authentic south Slavic language and that most Serbs and Croats today (even in Croatia and Serbia) speak the Bosnian language since the standard was based off of a dialect spoken in Bosnia-Herzegovina. As with anything, there is truth and falsehood in this claim. 

Bosnian Serbs mainly identify as just Serbs believing Bosnian is a regional designation for Serbs living in Bosnia. Serbs, along with Croats, officially accept Bosniak as an ethnic group now but believe it is a modern invention due to political reasoning. Serb nationalists believe that all of Bosnia and Herzegovina (and even beyond) is properly Serb land and that the inhabitants of said Bosnia and Herzegovina are really just Catholic and Muslim Serbs. They believe that the Bosnian language is actually Serbian and that most “Serbo-Croatian” speaking people are really just speaking Serbian which makes them Serbs (whether they accept it or not). They recognize the two other Serbo-Croatian dialects, Kajkavian and Cakavian, as properly Croatian (or maybe Slovene with Kajkavian) but claim exclusive ethnic rights over Stokavian. This reasoning was also used for Serb side in the war as sort of a ‘reconquest’ of their lands since they believed they had the right to take it ‘back’ in the name of Serbdom. Serbs in Bosnia speak Serbian as it is one of the official recognized national languages of Bosnia along with Croatian and Bosnian. IMO the Serbs have some good arguments and it’s true that a Serb from BiH, Vuk Karadzic made some major reforms in the East Herzegovian stokavian dialect ( also known as neo-stokavian which became the standard for today’s Bosnian, Serbian, and Croatian languages) but they refuse to recognize the non-exclusive history of Stokavian (i.e. west and east Stokavian) and how it has original elements in old Croatian literature as well as in Serbian and Bosnian. All three main ethnic groups rush to slap their ethnic label on these things only promoting the stuff they have factually correct on their side but refuse to consider the facts brought to light by the other side. 

Croats in Bosnia are just Croats. Croats are a little more accepting of the ‘Bosnian’ label than Serbs if they’re actually from Bosnia (and not Herzegovina for example) so long as Croat is also emphasized. Nationalist Croats consider all or most of BiH properly Croatian and most of the Bosniaks as Islamicized Croats while Serbs are a mixture of Orthodox Croats and Vlachs. Croats believe they are the original slavic speaking settlers of Bosnia and Herzegovina and that there is perfect continuity between the early Croatian kingdom and the later Bosnian kingdom and since both were Catholic and only the Croats in the region are recorded to have converted to Catholicism en masse that mere logical deduction demonstrates that ‘Bosnian’ was a geographical designation for tribes of Croats which even Ottoman writers and surveyors acknowledged. Bosnian Croats speak Croatian. Croats consider their language wide ranging and diverse but also original. Croats consider all three dialects of “Serbo-Croatian” variants of the Croatian language and speech evolved based on geography rather than nationalism until the 19th century. Modern Croats really try to distinguish details in Croatian from Serbian since both standards are 100% intelligible since both standards are based on the 19th century neo-Stokavian ( a partly artificial language). Elements of the Croatian claims are true but as with other nationalistic claims its only one side of the story which often neglects to consider others giving a pretense for self-serving nationalists to manipulate people.