I am a php programmer and wanted to get close to this "new world", but I have a few questions before creating my automated home

1) how to connect the Raspberry Pi / Windows PC that is in any sistem? how I must be wired between PC and a relay, then control it? (a diagram or photos will be more than good) I hope not only Wi-Fi

2) Speaking of visual style, I saw browsing the forums that some customizing the GUI, how do I install a template created by me maybe? (HTML5 / CSS)
Thanks a lot to everyone,
fantastic project