Help with Arduino program

what functions to use for switching modes such as Click once for mode 1 and twice for mode 2.

There isn't one function. There are sever things you need to do. First, you need to detect when the switch transitions from released to pressed. To do this, you need to read the current state of the switch, and compare that to the previous state of the switch. If not the same, a transition occurred. That transition could be from pressed to released or from released to pressed. The current state (pressed or released) tells you which way the transition went.

This implies, of course, that you need to save the current state of the switch, at the end of loop(), as the previous state for the next pass.

When a transition occurs, and that transition is from released to pressed, increment a counter. Base the rest of the code on the value of the counter. Reset the counter when it exceeds the number of modes you have code for.

Also ive read that when you take the atmega328 out of the arduino and put it into a circut, you need a crystal oscillator. Is that needed if I plan on putting it on a perf board.

Yes. You may want to consider using a Mini, Pro Mini, or Nano instead, to save the need to develop your own PCB/design.