The EFF provides this helpful information on their website, as a 1-page whitepaper (.pdf), or as a thorough Know Your Rights PDF.
Before you come across the situation where a police officer is asking to see your smartphone or computer and you have to decide to turn it over or not, it’s worth it to read the EFF’s presentation to know your rights. Since most will never even see a warrant, they also discuss what is required of a warrant to search your computer.
After you’ve given it a read through, you can take the Know Your Digital Rights Quiz to see how well you know the information.