The difference is the speed of the bullet.
Some rounds are inherently subsonic, like the .45 acp out of a pistol. This means it travels at less than 900-950 feet per second at sea level. Too slow to create a sonic boom which can be very loud.
If the .45 acp is shot out of a longer-barreled weapon, and/or has a lot of propellant, it can achieve supersonic speeds.
Almost all standard rifle rounds are supersonic and give a supersonic 'crack' when shot. There are specialized rounds for both pistols and rifles that have especially heavy bullets and less propellant, so the bullet travels under 950 fps, so it doesn't give a supersonic crack. When you shoot these rounds out of a silenced gun, they can be very quiet.
Shooting supersonic rounds out of a silenced gun is usually self-defeating because of the noise of the supersonic crack.