All three have their distinct usage.
* 남는다 (general statement, or present action): 1) to remain, to stay behind, 2) to be left as profit.
* 남아 있다 (description of current state - of meaning #1 only): to be/remain in the state (-아/어 있다 has this meaning.)
* 남았다 (event and its result - present perfect): to come about/be left as a result. (-ㅆ다 = past/present perfect tense form)
남아 있다 and 남았다 are close in meaning, but 남아 있다 is about the ongoing state while 남았다 shows an event and its result.
Examples:
1. 책상과 학생들을 세어 보니 책상이 하나 남는다 = Counting the desks and students, there's one extra desk.
2. 산불 후에 나무가 울창하던 곳에 재만 남아 있다 = After the fire, only ashes remain/are left where there used to be dense woods.
3. I went on a spending binge and there's only $10 left = 돈을 마구 써댔더니 만 원만 남았다 [or 만 원밖에 안 남았다].
#1 talks of what you get (what is left) after counting and comparing (not real but conceptual, so 남아 있다 would be wrong). #2 and #3 describe a state, but #2 stresses the ongoing state while #3 does both the action and the result.