Need a bit more information.
Is this a program you are creating yourself or one you are typing from another source (book,..)
Usually a terminal window will appear with an error message in it that you need to take into account.
Let us know what the error message is.
Also, if this is a program you are copying see if there are any references to troubleshooting it online.
The simplest way to see where your program is failing is by adding print statement through your code so you can see which bits are being executed OK before the code fails.
Finally, as per technoducky. Copy and Paste your code so we can see what may be causing the error.