Remembering button state

how can you get a button to input a state and remember the state

int currState = digitalRead(somePin);