KDE and its applications support sessions. This very nice feature allows the system to restore all applications that were in use when the user logged out of the desktop environment.
Please keep in mind that session support is limited to non-KDE applications and even for only some KDE applications. The degree of session recovery is up to the application programmer, ranging from just opening the application again, to opening it along with all the files that were open inside that application.
By default, KDE automatically saves sessions whenever you log out of the desktop environment. To change the default behavior, open the Session Manager KDE Control Center module ( + + -> from the main menu), make your choices and click on the button once you are satisfied with your settings. They will be effective the next time you log into KDE.