("Speak" is the most general word. "Speak" means simply that words are coming out of someone's mouth.)
"Talk" is almost a synonym of "speak," but "talk" usually implies that two people are communicating, talking to each other.
"Chat" is one of many words describing different kinds of talk. "Chat" means talking just for fun. It means being friendly with someone. It means a light conversation, not serious, including jokes and half-jokes.
"I need to talk to my lawyer."
Example of serious "talk:" "I just reviewed the release you sent me, but I'm not ready to sign it yet. I have a question about page 3, the paragraph beginning 'However, if the distributees..."
"I've been chatting with my friend."
Example of "chat:" "Hey, Suzy, how are you?" "Up to my a-- in alligators but apart from that not bad. You'll never guess who I ran into the other day?" "Who?" "Larry Elwell." "No, not Larry from our old high school?" "Yes! He's in town for a meeting. He works for GE now...."