What does "valium 5mg IV q2h prn agitation" mean?

IV Valium. Valium is a benzodiazepine medicine which can calm anxiety and agitation. "iv" denotes giving it intravenously -- i assume this patient is in the hospital or other medical unit. In this case, the person may be given 5mg of valium IV every 2 hours if agitated -- but the "prn" means it's only used "as needed" rather than around the clock.