Expressing causes (por)

To state the reason or cause for a consequence—like getting in trouble at a very strict library—use the preposition por followed by an infinitive. This translates to "for [doing something]."

They just banned him for underlining the books.
Lo acaban de expulsar por subrayar los libros.
They confiscated my ID for tearing the cover.
Me retuvieron la credencial por romper la portada.

The verb immediately following por stays in the infinitive. The main verb in the sentence establishes the consequence.

He received a permanent warning for yelling in the library.
Él recibió un aviso permanente por gritar en la biblioteca.

Just like in English, you can also use por followed directly by a noun to state the cause of a situation.

They just gave me the warning for the delay.
Me acaban de dar el aviso por la demora.
They have to pay for the delay.
Tienen que pagar por la demora.