While the weapons depicted in the Star Wars films are entirely fictional, believe it or not, a good number of the blasters depicted in the nine movies (to date) were based on real-world firearms.
The original Star Wars, now known as Episode IV: A New Hope, was made on a tight budget considering all the special effects work that had to be done, and it was mostly shot overseas. As a result, the prop department built an array of blasters and laser swords from what was available to them. At the time, that meant a lot of WWII-surplus firearms like Sterling SMGs.
Since the following movies, even though they had larger budgets, couldn't change the aesthetics created in the original, the practice continued—although many later iterations of various blasters were pure props with no actual firearms underneath.
Even in the prequel trilogy, the currently developing sequel trilogy, and the Star Wars Stories series—while there may not be actual firearms inside the props—many of the space weapons are still modeled after real-world guns.
Here are some of the blasters and other weapons from a galaxy far, far away and the terrestrial guns they are based on.