Creating a simple toggle
A D flip-flop is the (or at least a) solution for this.  You would connect your input signal to the flip-flop's clock input, and the ~Q output of the flip-flop back to the D input.  There are also T flip-flops that effectively have the ~Q to D connection internally.

If the flip-flop you choose has Set and Clear (or Reset) inputs, they should be connected to whatever level will allow the flip-flop to operate (usually High, I think).