If I have a 100mm lens, how far away can I shoot the subject? If I am shooting basketball, how far can I shoot the subject and still get a sharp picture?
If you are on the baseline or sideline, near the action, you probably want a 35mm or 50mm, and something between 80-150mm for longer range shots, depending on whether you want a full or half body shot.
Not sure what you mean about "how far can I shoot the subject and still get a sharp picture". Sharpness depends on how well you focus obviously, and how little camera or subject motion blur you get. So you want a fast shutter speed, at least 1/125 or faster, to prevent blur. With indoor lighting, that's hard to get without flash or a very fast expensive lens
As long as your subject is further than the minimum focus distance of your lens, you will be able to get a sharp picture.
There are other things that affect sharpness, including subject motion and depth-of-field. Since depth-of-field increases with distance, the further you are the more chances of your subject being in focus as it moves while you are focusing and taking a photo.
Subject motion is not controllable by you but the wider your aperture, the faster the shutter-speed to get a consistent exposure, this increases your change of freezing the motion of your subject. The only catch is that lenses are always softer wide-open, if you have a cheap 100mm lens this may be severe but if you have a high-end one then it should be minimal.
The farther the subject, the smaller the part of the field of view it will cover. Therefore the picture of the object will be composed of less pixels which means that the image will effectively be less sharp.