The water line to the fridge is most likely 1/4" OD tube (either copper to plastic). It would connect to the fridge with a 1/4" Compression by 3/8" Male Iron Pipe Thread adaptor. If this is the case, when you go to remove the line from the fridge, loosen the compression nut until the tube can be removed from the adaptor fitting. The unscrew the adaptor fitting out of the fridge. Reconnect the tube to the adaptor fitting and screw a 3/8" threaded brass cap onto the end that was connected to the fridge. Use a little pipe dope or teflon tape on the threads. Turn the water back on and inspect the joints for leaks. Tighten as required if there is any drips but be carful not to over tighten the compression nut.
If this in not the case with your fridge, pull it out and take a picture of what you find.