You are on the right track but you need another variable. The first parameter to digitalWrite is the pin number, you don't want to invert that. Also the second parameter is declared as an unsigned 8 bit value, not as a Boolean so I prefer to use the C ternary operator as follows:
int ledPin = 13
int ledState = LOW;
ledState = ledState ? LOW: HIGH; // C ternary operation to flip the value between LOW and HIGH
digitalWrite(ledPin, ledState);
or, if you want to do it in a single expression:
digitalWrite(ledPin, ledState = ledState ? LOW : HIGH);
The ternary operator may look odd at first but its useful and expressive once you get familiar with it.