When it comes to a dog shaking, there is no easy answer but there are three stimuli: pain (illness or injury), cold, and/or fear. If its a small dog it could be due to low blood sugar level.
If you suspect your dog is shaking due to pain (ilness or injury), the best course of action to follow is to contact your local vet who more than likely will want you to bring your pet in for examination.
If you suspect your dog is shaking due to cold, try to make your dog as comfortable as possible in a warm room and wrap it in a blanket. If shaking persists, it might be best to contact your local vet.
If you suspect your dog is shaking due to fear, try to calm your dog by doing things that the dog likes (Petting etc.) or give a treat to help distract the dog from the fright. It is definately worth trying to find out what caused the fear so to help minimise the dogs exposure to a similiar reoccurence.