Pet naming is a Hunter ability. If you're playing a Hunter, open your character panel with the "C" key, click the Pet tab, and type your chosen name beside the Name field.