The exclusionary rule says that evidence collected illegally or in violation of a person's constitutional rights may sometimes be used in court. The Fourth Amendment says that we have the right to be secure and not be unreasonably searched. It also says that there must be probable cause for a warrant.
If I have marijuana in my locker and the school does random locker checks with drug dogs and finds the marijuana, the evidence would be admissible. The drug dogs provided probable cause to search my locker and the locker is school property.