Section 338 of Indian Penal Code states that whoever causes grievous hurt to any person by doing any act so rashly or negligently as to endanger human life, or the personal safety of others, shall be punished with imprisonment of either descripttion for a term which may extend to two years, or with fine which may extend to one thousand rupees, or with both.
To bring a case under this section the prosecution must prove that the accused had acted negligently and rashly
The offence is cognizable, bailable, compoundable with permission of the court, and triable by any magistrate.
For example if a person while driving his car rashly and negligently causes grievous hurt and endangers life of another person is said to commit offence under section 338 IPC
Hope this helps