Immediate means right now, with nothing in between. The immediate effect of a painkiller, an immediate reply to an email, an order to leave with immediate effect.
The second use is about closeness rather than time. Your immediate family is parents, children, brothers and sisters and nobody further out; your immediate boss is the one directly above you; the immediate area is the few streets around you. Both uses grow from one idea, that nothing is standing in the middle. In speech the adverb immediately carries most of the weight, and in British English it can even join two clauses: immediately he saw her, he knew. Two m's, one d.
1adjectiveimmediateHappening at once, without any delay.
“The medicine brought immediate relief.”
2adjectivenearestNearest in relationship, position or order, with nothing in between.
“Only her immediate family came to the ceremony.”
3adjectiveurgentMost urgent, needing to be dealt with before anything else.
“Our immediate concern is getting everyone somewhere warm.”
Too few real examples of this word to estimate which sense is commonest.
Also accepted in games: instant
Immediate came through Old French immediat from Latin immediātus, which means "with nothing in between": in- for "not", on mediātus from mediō, "to be in the middle", from medius, "middle". The word says exactly what it does. Nothing stands in the middle, so it happens at once.
Latin
immediātus — without in-between, moderation
Old French
immediat
English, today
immediate
Built from
From Old French immediat (French immédiat), borrowed from Latin immediātus (“without in-between, moderation”), from Latin in + mediātus, perfect passive participle of mediō (“to halve, to be in the middle”) (see -ate), from medius (“middle”). by surface analysis, im- + mediate.
Etymology from Wiktionary, CC BY-SA