Its tricky especially against Muslim rulers. If you attack them the whole of Muslim spain will join their cause, and that sucks, (trust me I have just created the kingdom of Hispania and I know what fighting Muslims is like in this area). The previous points have it spot on I feel, but you don't need to swear fealty to anyone.
1. Make some advantageous marriages to places like Norway and France and England. Its easy, free and they are bound to like you more than the Muslims so they will come to your aid in most circumstances.
2. Fight the Muslims when they are in succession crisis, or they are fighting other Muslims. Personally I prefer when they are fighting other Muslims but sometimes a succession crisis means that nearby Muslim rulers join the fray too. So as long as other Muslim rulers are engaged with the struggle, pick off one of their closest territories with the help of your new found allies.
3. Blitzkrieg. Hire mercs and use your retinues to quickly directly assault the castles and then siege the towns etc. With their main force tied up in some other campaign with other Muslim allies your still going to have limited time. And the longer your campaign goes on the more chance that further away Muslims like the North African Muslims will join the battle. You have to act hard and fast. Get your allies involved as soon as you have clicked the declare war button.
I think so long as you follow these points you can be sure of victory. You have to choose your moments carefully, and as you take 1 duchy away, your success will snowball, well it did with mine.