Whenever I type "import pygame" in one of my programs, all it does when I click on it is pop up the command line and immediately disappear. For "import pygame" to actually work,I think I'm suppost to put it in a certain folder or something,but I have no idea.

I'm pretty sure the problem is that your script contains ONLY "import pygame". This means that after pygame is imported the program has reached the end of its script and closes the window. Add something like: