Han Solo explains how the Millennium Falcon (and any ship travelling at lightspeed) can get through the First Orders defensive shielding (As Admiral Ackbar calls it)
He refers to it as a "fractional refresh rate" which means that rather than being a continuous wall of energy, it is produced in pulses (from the shield generator) and every X amount of time, there is a small window of opportunity to pass through it, but of course, you have to be going really fast meaning lightspeed or more.
I'd like to add, that the duplicate answer marked in the question does not correctly answer this question and in fact just speculates. There is however, correct answers here:
Why couldn't the shield protecting the Death Star be penetrated at the Battle of Endor?
As I said, the shield fluctuates/flickers/pulsates meaning for a fraction of a second, they are down, and so a ship can pass through.