"How long does it take?"
A. 얼마 :
(1) a noun
(2) it stands for: unknown quantity, amount
(3) never precedes a descriptive verb (/adjective)
B. 얼마나 :
(1) an adverb
(2) meaning: how much; how many. Hence, besides indicating "quantity" (like 얼마), it can also be used to describe "quality".
(3) always precedes a verb (whether descriptive or action verb)
얼마 동안 = Lit. during/for an unknown period = For how long
얼마동안 걸려요 = what length of time will it take? (= how long will it take?)
(시간이) 얼마나 걸려요 = how long will it take?