What you are looking for is large depth of field. This is an optical property, not something applied as a special effect, so it's not something you can turn on or off. The raw image capture the light focused by the lens, and inevitably there will be parts of the scene out of the range where the rays are tightly organized by the lens. In fact, the fashion of shallow depth of field with blur as a key compositional element is relatively recent — traditionally, many photographers' concern was the same as yours: getting more of the scene in focus.
The good news is that you can affect this: a smaller aperture will give you greater depth of field. That means larger f numbers, like f/16 or f/22. This won't give you infinite focus, but will greatly increase the range which appears sharp. The "price" is that you'll need either higher ISO or longer shutter speed. For highest image quality, longer shutter is usually the better option — which is why tripods are common for landscapes.
For a given aperture, you can find the hyperfocal distance, which is the distance at which you can set the focus to get the largest depth of field. (There are a number of online calculators which can figure this out for you, although without an distance scale on the lens you kind of have to guess when focusing.)
If you use a pinhole lens the aperture will be so small that you will have effectively have infinite depth of field. But, with this approach, or even with any small aperture like f/11 or up, you sacrifice a little of the top possible sharpness of the in-focus area in exchange for greater overall depth across the scene.
To add to some of the confusion here: compact point & shoots and phone cameras use small sensors. That correspondingly means that the real aperture is smaller for the same field of view (see Why does a bigger sensor lead to a shallower depth of field? for details), which means that these cameras often have very high depth of field when focused on anything not right next to the lens. Because shallow DoF is trendy these days, some cameras and phones actually have a software-based effect to add the appearance of blur due to
limited DoF. So, for these cameras, it is a software blur effect that can be turned off. For bigger cameras like your DSLR, though, it's natural and unavoidable.
Finally, there is an emerging field called "computational photography", where unfocused light rays are recorded without a traditional lens. With this approach, focus is applied after the fact, just as you were thinking. However, this technology is in its infancy — the only commercial camera to work this way is the Lytro, and its resolution is so low that it's really just a toy (and a sort of "tech preview").