I downloaded a program in dos and it just opened and closed, why is that happening, or is it just my computer
Are you running the program in MS-DOS or in the DOS console of Windows? I don't know why the program opens and closes, perhaps it is a program which purpose was to open and close, so that its behaviour is correct. In other words, can you be a bit more specific.
If you are simply double-clicking it in Windows to run it, open up a DOS prompt, then run it from the command-line. Many command-line DOS programs will close immediately after being double-clicked...
Start Run "Command" type full path of prog
That would run test.exe and keep the window open