How does it work..

This might be a dumb question but how does the IUD actually WORK? I track my ovulation to know when not to have sex so at first I was confused that I still ovulate at all? I thought that’s what the iud did. But I do so how does it actually work?