Chocolate is made from the seeds of Theobroma cacoa which are roasted to make that wonderful confectionary that we humans love. Dogs also enjoy chocolate and will often eat large quantities if they are allowed, but they shouldn't because it is a poison for them even though it tastes nice!
Chocolate contains theobromine and caffeine. It is the theobromine content that is the problem for dogs. In large amounts theobromine causes relaxation of smooth muscles, is a diuretic (increases urine production) and stimulates the heart and central nervous system.
Dark chocolate contains more theobromine than milk chocolate so this is more dangerous for dogs to consume. A dog weighing around 10 kg which consumes around 4oz of milk chocolate may show signs of poisoning. If it ate 40oz then it may die. Although 40oz of chocolate sounds like a lot for a dog to eat it is not impossible given that chocolate is tasty and dogs may gorge on it if they get the opportunity. Dark chocolate would produce similar signs if smaller quantities were consumed.
Signs of poisoning will probably not occur immediately after your pet eats chocolate. If your dog has consumed a large amount of chocolate the signs often become apparent in around 8 hours or so and death may occur shortly afterwards. Signs of chocolate poisoning include an increase in thirst, vomiting and diarrhoea, loss of bladder control, nervous behaviour, muscle spasms, seizures, coma and death.
If your dog has eaten a large amount of chocolate then take him to your vet immediately. Try to take the wrapper or packaging from the chocolate so the vet knows how dark the chocolate was and the approximate weight consumed. The vet may be able to give your dog an emetic to make him vomit the chocolate before it is absorbed. This may work for several hours after consumption since chocolate does not seem to be quickly absorbed. Treatment with activated charcoal may also help to reduce the amount of theobromine absorbed by the gut. Your vet may want to keep a close eye on your dog and it may be necessary to admit your dog to the hospital for fluids and other treatment in severe cases.
If you want to give your dog a chocolate treat then use very small quantities of milk chocolate. Personally I would completely avoid giving chocolate to dogs. However many people do give small chocolate treats to their dogs and normally this is OK, but do take care not to give too much.