Both mark progressive aspect
Chinese uses 在 / 正在 / 呢 to indicate that an action is in progress at a reference time. 在 and 正在 attach before the verb. 呢 attaches at the end of the sentence. You can combine them: 我正在吃饭呢 is emphatic but still grammatical.
When to pick 在 vs 正在
在 is the neutral, unmarked progressive. Use it when you simply want to say an action is happening: 我在看电视 (I am watching TV). 正在 adds the sense of "at this very moment" or "right in the middle of". It is useful when someone interrupts you: 我正在开会,等一下 (I am in a meeting right now, wait a moment). In writing and formal speech, 正在 is often preferred for clarity; in casual speech, 在 dominates.
我在写作业。/我正在写作业,不要打扰我。
Wǒ zài xiě zuòyè. / Wǒ zhèngzài xiě zuòyè, búyào dǎrǎo wǒ.
I am doing homework. / I am doing homework right now, do not disturb me.
Past and future ongoing
在/正在 is not limited to the present. Combined with time adverbs, it describes an ongoing action at any point in time. 昨天下午三点我在上课 (Yesterday at 3pm I was in class). 明天这个时候我正在飞机上 (Tomorrow at this time I will be on the plane). The progressive is about aspect, not tense.
Negation
Negating ongoing action uses 没 + 在: 我没在看书 (I am not reading a book). Some speakers say 没 on its own and drop 在 for colloquial speed. 不在 exists but means "not present / not here" in a location sense, not a negation of ongoing action.
Things 在 / 正在 cannot modify
Stative verbs (是, 有, 姓, 知道, 觉得) resist progressive marking because they describe states, not events. 我正在知道 is ungrammatical. Action verbs, activity verbs, and achievement verbs all take progressive marking naturally.
Native-speaker shortcut
If your English uses a present progressive ("I am studying"), try 在 first. If the sentence demands "right now at this very moment" emphasis, upgrade to 正在. If you want sentence-final spoken emphasis, add 呢.