When you land in Houston
You will be directed/routed onto only one possible path: to customs and immigration. There, you will tell them your story, declare anything you are bringing in... if they deem necessary they will pull you aside for further inquiry and bag inspection, just like you see in the border patrol TV shows on Youtube. This also involves you picking up your luggage. That is necessary in case they want to inspect it.
Most likely, when you are finished with Immigration and have your luggage, you will exit to the street side of the airport.
You must re-enter the system
Now you must go re-check your luggage and re-enter through the TSA security line.
You are now traveling domestically.
TSA and gate agent will check your passport only for ID. When you exit the plane at Chicago you will not be stopped by anyone.
Note: there are a few locations where TSA does preclearance at the foreign airport. In that case you will clear US customs & immigration inside the foreign country, and the airplane will gate at a domestic terminal in the airside area. You can remain airside and just walk to the gate of your Chicago flight.