It the Resume feature.
When choosing Restart, Sleep or Shutdown there is a checkbox you can uncheck to prevent the apps from launching.
Also in System Preferences > General there is a hard-to-find checkbox under "Number of recent items" you can turn off.
Also, you can hold the shift key to disable resume on a one time basis.
If you want to turn it off on a per app basis, (TextEdit is by example, replace TextEdit with the name of the app)
Launch Terminal and copy/paste this at the prompt...
defaults write com.apple.TextEdit NSQuitAlwaysKeepsWindows -bool false
You can also accomplish this through the GUI by going to ~/Library/Saved Application State/TextEdit and delete that file…
(note that the User Library is hidden - one way to get there is to go to your Finder "Go" menu hold the option key to choose "Library")
To turn off Resume globally...
chflags uchg ~/Library/"Saved Application State"
The reverse of the first one is to replace false with true.
The reverse of the second one is
chflags nouchg ~/Library/"Saved Application State"
Again, you can accomplish this through Finder by going to ~/Library/Saved Application State and deleting the folder.