Arduino switch and relais

hello everyone, I have a question because I am not so good with Arduino. I want to switch a device with a relay. The relay must be triggered by a push button but I want the relay to be switched on when the push button is pressed 3 times in a row and that the relay goes out after 3 minutes, for example. Can someone help me?

start small. Look at the State Change Example in the IDE (File->examples->02.digital->StateChangeDetection) and it will show you how to detect when a button is pressed or released.
Build up from there by counting how many times this happens. When you get to 3, toggle your relay.

Also check out the Blink Without Delay example to learn how to track elapsed time so you will know when 3 minutes has passed since you turned on the relay.

Good Luck!

Thanks:)