Both 一直 and 總是 mean "always", but they are not interchangable.
一直 = tends to happen nonstop ; emphasizes a kind of stable/continuous state
總是 = emphasizes high probability or frequency (almost habitual)
Some examples I found online to highlight the differences: (Parentheses not explanations, rather comments)
這家飯店服務同到,我每次來北京總是喜歡住這兒 (you're not always there, but when you are, you always stay in the same place)
今天從早上到現在,一直在下雨。(It rained nonstop)