If both chips run from the same power supply and you use input 3 on the 08M, then all you need to do is connect them together.
If they use different supplies or you use any input other than 3, then it would be a very good idea to fit a current limiting resistor between the output of the 18X and the input of the 08M.
This is to protect the chips from excessive currents on their outputs. If for example your 08M had a program error which turned the input into an output, it would 'fight to the death' with the 18X to control the logic level of the line.
How the two would actually 'talk' to each other is up to you but have a read about serout and serin commands.
Not too sure what you are asking about with regard to the "programming and putting in a socket" part of your question.