What kind of car? Some models have a threaded hole in the rotor hub where you can thread a bolt in, and it will press against the wheel hub to free the rotor.
But you say it's like a spring is holding it in? Does that mean it's loose on the hub but something is holding it back? Once you've removed the brake caliper properly there won't be anything holding the rotor on the hub, except for maybe a bit of corrosion.