What you tell your children about your upcoming divorce will depend largely on how old they are. If you have grown up and left home, they can probably cope with a bit more reality than if they are in kindergarten.
Regardless of that, there are a few rules that apply to all ages. For example:
Be nice to their other parent
Do not use them as a sounding board for your marital complaints or push them into agreeing with you about how bad your spouse is. They will cope better if they feel free to stay close to both their parents. Besides, they know from first-hand experience that neither of you is perfect.
Time your discussions carefully
If you want to put your kids off Thanksgiving for life, then, by all means, tell them about your divorce while you are carving the turkey. Otherwise, try to avoid significant dates, as the memory of your news will forever tarnish them.
You also want to avoid times when your children are busy prepping for a crucial exam, as they may pass the whole exam thinking about what you just told them rather than the answers to the paper in front of them.
Make it a discussion, not an announcement
Your children will undoubtedly have questions about how your divorce will affect them. They may think of more in the following days or weeks. Make time to answer them.
You may not yet know all the answers. Getting help from someone familiar with divorce laws can help you prepare.