Controlling Triac by Arduino

I have googled a little bit, but the codes I found so far are not clear to me. I have no schematics either. Can anyone help me out?

After googling, you have no schematic? That's hard to believe.

As for the code not being clear, you haven't shown any code or explained what isn't clear. So, clearing it up will be problematic.

If someone has a code how to use values received from a regular 10K analog potentiometer on the input of the Arduino for the Triac's gate - then I can figure out the rest for my own purpose.

What is the potentiometer to be used for? The analogRead() function already reads the data. How to use that data is up to you.

The amount of dimming you get from a triac is based on the time after the zero-crossing event occurs that you trigger the output. Short time == little dimming. Long time == lots of dimming.