Some SMs are placed within launch capsules and can be fired through the submarine's torpedo tubes. These missiles are initially propelled by a solid propellant motor and once clear of the water (and the launch capsule) they then ignite the boost motor.
See also Submarine launched ballistic missile.