To separate the complete thoughts within a compound sentence:
- Roma es el centro espiritual del catolicismo, y su centro ha sido declarado Patrimonio de la Humanidad por UNESCO. Roma is the spiritual center of Catholicism, and its center has been declared a UNESCO World Heritage Site.
- Muchos lagos se forman por la obstrucción de valles debido a avalanchas, y también se pueden formar lagos artificialmente por la construcción de una presa. Many lakes are formed by the obstruction of valleys due to avalanches, and they also can be formed artificially by the construction of a dam.
As the equivalent of the decimal point: In Spain, South America and parts of Central America, the comma and period are used the opposite of the way they are in American English. Thus 123,456,789.01 in English becomes 123.456.789,01 in most areas where Spanish is used. However, in Mexico, Puerto Rico and parts of Central America, the convention used in U.S. English is followed.
When the comma isn't used: Perhaps one of the most common misuses of the comma in Spanish by English speakers is its use in salutations in letters. In Spanish, the salutation should be followed by a colon. Thus letters should begin, for example, with "Querido Juan:" rather than following Juan with a comma.
As a general rule, as in English, a comma should not be used to separate the subject of a sentence from the main verb unless necessary to separate words of apposition or intervening phrases.
Main reference: Diccionario panhispánico de dudas of the Spanish Royal Academy.