Apps in El Capitan won't close when clicking the red close button
There is a difference between closing a window and quitting an app. Many apps continue running even if they have no windows open, although newer versions OS X can close them if it needs the RAM (if the app is coded in the appropriate way). 

If you want to be sure the app is removed from the Dock and ⌘ Command Tab switcher, use ⌘ Command Q or App Menu > Quit.