Chemistry - Why does the hydroxide ion have a negative charge?

A water molecule is charge neutral because there is the same number of positive charges as there are negative charges.

In this diagram, called a Lewis structure, the dots represent electrons while the lines or dashes represent a covalent bond of two electrons.

h2o lewis structure

When water ionizes one of the hydrogen atoms absconds with itself and leaves it's electron behind, giving us the hydroxide ion. The extra electron gives hydroxide a net charge of -1.

enter image description here

The brackets indicate that this is an ion, charge is denoted at top right.

To go deeper down the rabbit hole on this one I recommend reading up on the Octet rule and Electronegativity.