These two go into depth on that subject
islamqa.info
islamqa.info
I don't think I've really looked into it very much. Some people believe that predestination negates free will but I don't believe so. I might not know exactly how free will works but I believe we have free will and we know Allah can do anything and so Allah can definitely give us free will.
Allah already knows if someone is going to commit a particular sin for example but I don't think Allah causes them to commit the sin.
If someone sees two cars and sees one is about to crash into the other, they might know that the one will crash into the other but they don't actually cause it. So having foreknowledge doesn't actually cause an event.
I have no problem accepting both that Allah knows what will happen and that we have free will. I know the topic can go a lot further into depth, though. Allah might present us with a test but I think we decide how to respond. Allah already knows what will happen but we exercise our own free will.