Dogs, like people, are not all the same.
Some dogs might choose to go away and experience their demise alone. People who are romantic tend to believe this is because the dog doesn't want her owner to suffer, but I'm not sure about this theory.
I had a dog who was very old, and by the end of her years couldn't really walk or even stand, and she just died in her sleep one day.