Yes, if you search for something related to child pornography, then you may have to go to jail. Not only will you have to go to jail, you may also have to pay a heavy fine. Obviously, this is a very sensitive topic and doing any work on it or finding information about this topic can prove to be very dangerous. Many people even jokingly search for such things, while doing so can prove to be very dangerous for you and you can go straight to the lockup.
Child pornography is a form of child sexual abuse. This federal law defines child pornography as sexual exploitation involving a minor (person under the age of 18). Not only this, there are many more such topics which search can open the doors of jail for you including movie piracy, bomb making and abortion etc.