Pillager Captains can be found at Pillager Outposts, which spawn randomly in the Overworld (however they usually spawn close to Villages). Once you find a Pillager Outpost, look for a Pillager wearing a large banner on his head. This is the Pillager Captain, and killing him will give you the Bad Omen effect, which will trigger a raid if you enter a Village.