I dont know if this is legit or not, but you need several things:
1.) Compelling story: whatever you're writing has to be interesting enough that people want to see it through to the end.
2.) Periods of action and rest: it is often best to go with the flow or write like a wave. A period of action is followed by one of rest. A period of more intense action after one of normal action can be used sparingly for great effect.
3.) Compelling characters: obviously, if you do not have characters that the readers like you will struggle to retain them. They can like them in a positive manner or can like yo hate them, such as a good villain they want to see receive proper comeuppance.
4.) Decent or better prose: while not as critical, quality prose can help a lot. If your story is comfortable to read it never hurts, but if it is poorly written it will hurt.
These things are some useful, basic tools and insights that can help retain readers.