Also, what's the difference between the gangsters of the time and the mafia? Or is there one?
Aha, the history of organised crime, the subject I wrote my dissertation on! Not something I see much on this forum. Unfortunately, I was focused on Russia, not America, so I can't give you a lot of detail for the main part of your question. I can say that, firstly, American criminal gangs predated prohibition, it's merely that bootlegging alchohol was a massive earner for them, and allowed them to gain a large amount of contacts in various sectors of society, so was a big boost to their power.
I assume you mean organised crime in America? Because in the rest of the world, it wasn't necessarily associated with bootlegging per-se.
Now, as to the Mafia. Specifically, the Mafia is a Sicilian criminal organisation. However, as it is one of the most famous criminal organisations in the world (it's only about the fourth most powerful in Italy today, but it used to be one of the most powerful, having deep influence in Italian politics and the economy in the post-war period), the name became a common term to apply to other organised criminal gangs in English (and Russian, where criminal gangs are often referred to as Mafiya), particularly Italian ones (actually, Italian criminal organisations all have their own names, such as the Camorra and 'Ndrangheta, so Mafia is an innacurate term).
Now, America used to have a large problem with Italian* criminal families based in New York, New Jersey, and Chicago. Many of them were specifically Sicilian, and some had contacts with the Mafia in Sicily (or had been members), so these families and criminal groups began to be known as "the Mafia", and sometimes called themselves "the Mafia". Another name was "La Cosa Nostra" (Our thing). It's not actually clear that they called themselves this originally, it was a term that a criminal-turned-informant told the FBI they called themselves. But the FBI always saw these criminal groups as a highly structured organisation (whereas they may well have been a lot more loosely organised), and wanted to know its secret codes and names, so it's quite possible the informant made it up. When films like "the Godfather" and "Goodfellas" came out, they used terms like "the Mafia" and "La Cosa Nostra", based on FBI reports, thus popularising the terms. As organised criminals have a habit of a) adopting the way they see themselves portrayed on TV, and b)when informing, confirming whatever prejudices investigators have, not to mention the secrecy, it's difficult to reliably say whether Italian-American criminal gangs actually referred to themselves originally as "the Mafia" or "La Cosa Nostra", rather than just "the Gambino family" or equivalent terms, and how significantly they were connected with the Sicilian Mafia.
*It should also be said that America has had problems with criminal organisations of many other ethnicities, but these have mythologised in different ways (or, in the case of white gangs, not seen as part of a phenomon of ethnic crime at all), it's just that it's Italian-American gangs which have been mythologised as the "Mafia" so that's what I'm discussing. It's also important to note that most "ethnic" criminal gangs in the past were not as homogenous or as structured as they were seen to be. Many early "Italian" gangs included Jewish members, for example. However, saying that, criminal gangs in the early and mid-20th century were generally both more structured and more ethnically homogenous than criminal gangs today, both in America and the rest of the world.
I don't remember all the sources (and it should be noted that this is both an under-researched and contraversial area by historians, and an extremely difficult one to study), but in terms of understanding what the "Mafia" is and is seen to be, I'd recommend Mythologising the Mafia by Mark Galeotti. If you want to actually read about the American Mafia, there are loads of books, but it wasn't exactly my area (as I said, I focused on Eurasian "Mafiya" gangs primarily), so I'd rather let someone else recommend such things.