Welcome to eectronicspoint.
A word of warning first: You're going to deal with dangerous, potentially lethal voltages and currents. Make sure you take every precaution necessary and you observe any applicable safety standards. We can not accept any liablility for damages. When in doubt, ask someone with the necessary experience near you to check your setup.
The theory of triac control is described e.g.
here.
This paper describes how to isolate the hot side from the controlling side.
And here is a
tutorial including complete circuits.
For more detailed information we need to know a bit more about your circuit, e.g. how are you going to control the triac (potentiometer, microcontroller...), do you just want to turn the lamps on and off or do you need to dim the lamps, what is your mains voltage and frequency etc.?