Well if you mean interacting with a program as in, actually using the program with another program, you would need to learn the Win32 API with C++, and learn about FindWindow which will help you select the proper GUI HWND's (AKA the GUI parts of the program) and interact with them according to the type of GUI it is, and use the corresponding API in msdn.library.com.

If you mean interacting with the program via a protocol, which would be the best, you would need to know that specific programs protocol, or if you own source code for both programs then you can have them communicate with each other either by OS WinAPI messages using SendMessage, or you can use TCP or UDP internet protocols to communicate as well.

However, I think usually the GUI integration is easiest. However it takes a long time to learn everything about that subject as documentation is not that abundant on it.