Stars: Doubtful. It would get melted.
Gas giants: Doubtful. It would get crushed.
It would pretty much be Both: Vaporised and Crushed.
Izack is right though. If you neglect Physics then the question becomes pointless.
Aw, aren't we allowed to include a smidgeon of handwavium?
For example, if you had some sort of indestructable material, it would made sense for it to simply bounce off another object made of indestructable material, since both objects are indestructable, yet momentum has to be conserved.
We can't neglect gravity though, because without it, everything falls apart. So we can really take two journeys to the core of a gas giant: one is deorbiting a spacecraft into the atmosphere, the other is to stand some distance away, and then use a powerful propulsion system to impart a large velocity to the spacecraft, in a direction that passes directly through the gas giant.
The first example leads to the vessel slowing down in the atmosphere and slowly sinking to the core, or near to the core.
The second example leads to a very violent deceleration as drag from the atmosphere, mantle and core. In reality throwing something at a gas giant like that would cause it to disentegrate rapidly, but since we have an indestructable spacecraft, all this would achieve is disruption of the atmosphere as the kinetic energy is imparted to it from the vessel.
Theoretically you could achieve a large amount of disruption to the planet, if the vessel was travelling at an extremely high relativistic velocity. At this stage though, the velocity would be high enough that the travel time within the planet would be too short to impart any good deal of energy to it, and the spacecraft may indeed fly through, "melting" its way through with its high velocity.
However just because you have an indestructable material, does not mean you have an indestructable crew. They would be cooked by the hull, unless of course the indestructable material was also a perfect insulator. And in the second and third examples they would likely encounter such great accelerations as to be turned into something with the consistency of marmite...
Nonsense sure, but a fun thought experiment nontheless.