It depends entirely on the game. Anything with manual saves will simply resume where you last saved, while games with checkpoints or autosaves pick up from the last one triggered.
Roguelikes and permadeath titles are the exception — quitting there often counts as abandoning the run. Online games are the worst case, since leaving a match usually registers as a loss or a forfeit.