The nominees are chosen by the Music branch of the Academy. The final voting for the award, however, is done by all the members of the Academy. (oscars.org)
There are no specific criteria for voting. Each member subjectively votes for the song that they like the best.
The Best Original Song Award goes to the songwriters, not the performers (unless they participated in writing the song). In order for a song to be eligible, it must be an original song written just for the movie. If a movie musical is based on a Broadway musical, none of the songs from the Broadway version are eligible. This is why movie musicals almost always have a new song in them that was not in the original musical. Songs that rely on sampled material are also ineligible. The song must have a "clearly audible, intelligible, substantive rendition (not necessarily visually presented) of both lyrics and melody, used in the body of the motion picture or as the first music cue in the end credits." Under the current rules, a single movie may have no more than two songs nominated. (Wikipedia)
Ties in voting at the Oscars are possible. When this happens, two Oscars are given. This has happened before in other categories, but has never happened for Best Original Song. (oscars.org - PDF)