The primary reason the Earth doesn't fall into the Sun is that it has a very large tangential velocity with which it is able to maintain an orbit. The physics is the same for describing satellites which we launch into orbit around the Earth. I've heard it described as such: "The ISS is falling towards the earth, but is moving forward so quickly that it continually misses."
In short, if you were to take a mass and insert it with zero velocity somewhere in the solar system, it would inevitably fall in towards the sun. But because almost all bodies in our solar system were formed from the same large clump of rotating gas and dust which due to conservation of angular momentum during its collapse both sped up and flattened into a disk, all of the solar system bodies (Earth, other planets, asteroids, etc), have enough forward velocity to continue orbiting the Sun without being pulled to the center.
From a physics perspective, you can see that centripetal acceleration is governed by the inward force of gravity, tangential to the direction of motion of moving objects.
In fact, the Solar Parker Probe which just launched is attempting to do exactly as you describe --- fall into the Sun (or well, get close, to take lots of measurements). To do so is actually difficult, because the probe, launching from Earth, has to lose roughly 30 km/s in velocity it already has (because that's the Earth's orbital velocity).
How it plans to do this is a cool story in and of itself, which you might be interested in, here's a good summary: https://www.theatlantic.com/science/archive/2018/08/parker-solar-probe-launch-nasa/567197/