Popular Science did an article on naming rocks on Mars (thanks to sclerotic rings for the link). The article though doesn't clearly describe who gets to name objects.
The brightest stars visible to the naked eye were named by the ancients (things like Vega, Sirius, Procyon, Antares, etc.) - Greek, Latin, and Arabic names have come down to us today, though other cultures had their own names. Those and the next few dimmer in each constellation are named for the constellation and a Greek letter (usually) designating how bright it is compared to the others in the constellation (Alpha Centauri, Gamma Tauri, Alpha and Beta Orionis are actually swapped, etc.) The next few hundred dimmer than that visible with a telescope are numbered in order of brightness. Then the ones that you need scientific telescopes or satellites to see are just given coordinates, or a number in a catalog made by some astronomer who cared.
If you ever "buy a star" or pay money to "name a star" you are throwing away your money in a scam. No one scientific ever sees those lists of names, and the star you "bought" already had a scientific name. Spend your money on buying an acre of rainforest land instead, because at least then although no one knows that you bought it, your money makes a difference.
Solar System Objects
When first discovered, these are given a serial number such as 2003UB313 - year, letters somehow indicating the names of the discoverers, and sequentially what number of that's group's multiple discoveries. Probable planet moons will get something like 2003P1 - year, planet, number of moon after known moons. After a few years of further data, the person who discovered the asteroid or outer solar system object gets to name it (2003UB313's future name was leaked as Xena), while moon names have to be approved and have to fit the scheme of that planet's name. The International Astronomical Union (IAU) keeps track of the names.
Features on Planets
Those visible by eye (i.e., on the moon) were named by the ancients. Those visible by telescope have followed naming conventions established by the ancients, or themes established since (goddesses on Venus, astronomers on the Moon). Those features visible only by remote sensors placed on the planet are unofficially named by the crew manning the robot, but I'm not sure whether the names stick according to the IAU.
Features on the Sun
These are transient, lasting no more than a week or so. They are numbered by the astronomers studying them.
Nebulae, Star Clusters, and Other Galaxies
Although a number of these are visible to the naked eye, we can't usually tell if they're stars or other things, so they weren't given names by the ancients. Since the 1800's when there was a boom in finding coments, astronomers have been coming up with catalogs numbering these things that aren't comets, and attaching nicknames based upon what they look like. This process continues today, with individuals, groups, or automated telescopes doing surveys and numbering them sequentially by coordinates - the whole catalog is named by or the person/s creating it (Messier, New General Catalog, Henry Draper, Abell, etc.). If an individual does (rarely) discover an object or does the first significant research on it, it will often be named after him or her (Zandperl's galaxy) or the name that person/group used to describe it will become popularized (the Hamburger nebula).