The centrifugal force of a planet's orbit around the balances the Sun's gravitational pull; that's essentially the definition of an orbit. Consequently only some outside force can change the orbit.
Consequently there are two mechanisms by which an orbiting planet can move closer to its sun. One is friction, if there is a lot of material in the orbital, as happens during the early stages of planetary and solar system formation. Most migrations of planets towards their sun happen during this era.
The other mechanism is interaction with a massive colliding or near-colliding body, e.g. a passing star.