I am honestly not sure what the first modern instant messanging program is, but
talk (software) - Wikipedia, the free encyclopedia was one of the earliest that I could find any information on. Talk debuted in 1982, and was supposedly the first program which allowed more than 2 users to talk to each other at once, which would mark the beginning of what we today know as chat rooms. Besides that I don't know.