Do you mean the red icon in the top right corner of a window? There's 3 icons, Minimize, Maximize/Restore and Close. The Close will usually close the program that is running as its window is closing. I've not seen any way to individually change those.