They have corresponding Chinese expressions, but there are subtle differences that makes you easily confused if you are only given a "word to word" translation. So I'll explain them in example sentences.
(1) in 3 months. In Chinese you can say 三个月后. For example:
The class will end in 3 minutes. = 3分钟后下课。
I'll be home in 10 minutes. = 10分钟后我到家。
But here's the tricky part to better understand it. The word "in" in "in 3 months" means you do something exactly at the moment when the next 3 months finish. 后 means after/afterwards in Chinese. So you might think wait, shouldn't 三个月后 be translated as "after 3 months"? No, here you need to remember 1. when you want to say "in 3 months", you say 三个月后. 2. if you want to say "no longer than 3 months/ within 3 months", then this is the point you use 三个月内, where "内" means "within/no longer than" (literally "内" is "in", but different here. weird huh? don't worry, just remember it and you'll see more of them used in the future, then you'll understand them better.)
e.g.
* 你必须在10分钟内完成你的工作!=You must finish your work within 10 minutes! = You must finish your work in no longer than 10 minutes!
(2) for 3 months.
In different situations you need to say it a little differently in Chinese. Here are some examples and you can try to feel the difference:
Situation A: Things have happened/ have been happening.
* I have been walking for 1 hour.=我到现在已经走了1个小时。
* I walked for 1 hour.=我走了一个小时。
* It's been raining for 2 days.=到现在已经下了2天雨了。
* It rained for 2 days.=下了2天雨。
have been doing sth. till now = 到现在已经verb了
have been doing sth. for 3 days till now = 到现在已经verb了3天
did sth. for 3 days = verb了3天
"了" is used after the verb to mean something that has been happening/ has happened.
--------------
Situation B: Things not happened yet.
* I need to hold it for 10 seconds.=我需要坚持10秒钟。
* He'll stay in New York for 3 days.=他将在纽约呆3天。