Usually, the only way occupy the province of a person at peace is to attack a mutual enemy who is already occupying it (in which case you can choose to retain the province afterwards without declaring war - but it has a high chance of angering the original owner so much that they will declare war anyway)

Enemy kingdoms sometimes invade you without declaring war (rarely, but some do) - and there are also some spells that reduce your province's economy that other realms can cast on you (e.g The Iron Barony's 'Acid Rain' spell)