Separation anxiety is a real problem for many dogs. These are basics and probably don't even need to be mentioned. Most of all, it is up to you to keep the dog safe. Don't ever put him or her in harm's way. A fenced yard is an ideal situation, although many people successfully have dogs in many other living situations.
Training is equally important.
This starts with potty training. It goes on to teaching the dog good behavior. There are plenty of excellent books on this subject. Get your dog in a good beginning obedience class, and you'll never regret the time you spend. Give your dog the best you can give him or her.