If you click on that red traffic light, Preview appears to close the document and disappear from the Dock. But, it remains running as a background process. Some applications can be written to close a document, and gracefully terminate a process when clicking that red traffic light — but most, including Preview are not written that way.
You should use the File menu : Close Selected Image, followed by the File menu : Quit (or ⌘-Q). If you have multiple documents open in Preview, then use the option key modifier, and choose File menu : Close All. Then quit the application as previous.
If you follow the second paragraph, Preview will not be left running in the background, and all of your opened documents in Preview will be properly closed.