Usually we need a subject to know, who is doing something in a sentence. However, there are some cases (again not different from English), where there is no subject in a sentence with an infinitive.
Examples
Prohibition
Interdit de fumer!
No smoking! (Smoking prohibited)
Instruction
Ajouter un demi litre de lait et laisser bouillir.
Add half a litre of milk and let is boil.
General statements
Plutôt se battre et mourir que vivre en servitude.