Short answer: listen to Bool algebra and logic lectures.
Long answer: IQ means how fast you can process information in your brains, and also if you can solve basic logical tasks. However, having high IQ does not mean that you are smarter than someone, it means that you can think faster, you can do some tasks faster. Again, in my case, I love to double-check answers sometimes and in IQ test I cannot do that as they measure time.
Anyway, I think educational system should teach logic in schools more. Now it feels like kids can use formulas, but they don't understand how anything works or why they need it. Logic is a general skill to have.