Arduino for driving Arduino

Hello Friends,
I'm venturing into a very ambitious project for my "knowledge".
I would like to ask your help.
I would like to create a system composed of two Arduino, connected via Ethernet, Arduino A should drive the Arduino B
example:
Arduino A switch in HIGH pin on the Arduino B.
How do I get them to talk?

Thank you all.

similar way as an arduino talks to a sensor ...
Most easy is if one acts as a master (taking initiatives for communication) and the other act as slave.

Hi robtillaart,

thanks for your reply.
How can I create the sketch to do this.
You can give me some examples?

thanks