Turn Off the Flash
Turn off the flash. This will only apply at night or in a dark location, but when the flash is turned on, the camera will only be able to capture nearby objects. This is because a camera works by capturing light. If you flash into the darkness, this light is wasted. Instead, take a shot with the flash off and the camera will capture more light from a distant source, such as your far away object.
Keep the Camera Still
Hold your camera still or attach it to a tripod. You could even rest it on a wall. Rather than taking an instant snapshot, your camera lens will be open for anywhere between 1/20 of a second to several seconds, depending on the settings. If you move the camera even a little in this timeframe, objects that are far away will blur. Minimize this effect by keeping the camera absolutely still.
Change Shutter Speed
Alter the shutter speed on your camera. If you're unable to keep the camera still, but have plenty of daylight, then you want a very quick shutter speed. If you're taking a photo at night, but the camera is completely still, then leave the shutter open for as long as possible to let plenty of light in during the exposure. In any other situation, you will need to find a compromise to achieve best results.
Reduce the ISO
Reduce your ISO settings. The lower the ISO, the higher quality image you will achieve, but in low light, you will require a higher ISO to see anything at all. In the ideal situation, you would take your distant photo in bright sunlight with a low ISO setting.
Long-distance Lenses
Attach a long-distance lens to your camera if you're using an SLR or DSLR camera, as the lens on a standard digital camera can't be changed. The longer the lens is the better a long distance shot will be.