It is a kind of filler words like 'you know' in English.
There some alternate forms like ''말이야', '말이죠', '말이지', '말인데','말이에요','말인데요'
말이에요 is honorific form of 말이야
말이죠 is honorific form of 말이지
말인데요 is honorific form of 말인데
e.g
그런데 말이야.
하지만 말이죠.
내가 말이지 어제 낚시를 갔는데 말이지.
우리끼리라서 말인데.