This page is how I attack castles.
You'll need a lot of archers and crossbowmen, especially if you are going against a keep or better.
Here is the general minimium army composition against the various castles.
Palisade
60 Macemen
30 Knights
XX Peasents
Against a Palisade, you can simply use some siege towers in the back and take the flag.
Bailey
120 Archers
70 Crossbowmen
80 Macemen
80 Swordsmen
XX Peasents
Again, you can use siege towers in the back, but this time there is a moat you have to fill up.
Keep
140 archers
120 Crossbowmen
100 Swordsmen
60 Knights
60 Macemen
XX Peasents
Castle
180 Archers
180 Crossbowmen
100 Knights
120 macemen
XXX Peasents
Its possible to take a Stone Castle with just Knights and Macemen. With 30 or so macemen start digging. Then, knock down the walls, and run to the flag with knights.
Royal Castle
280 Archers
280 Crossbowmen
200 Swordsmen
150 Knights
160 Macemen
350+ Peasents
The reason you want lots of peasents for a Royal is because you need them to dig so your real troops won't die trying to fill the moat.
Catapaults
These are OK for taking out chunks of wall from a distance. They take time, though. They might be useful against a Royal Castle, where you need to fill up the moat before doing anything.
Battering Rams
you should probably get these against a Stone Castle or lower. Against a Royal Castle you can only knock down the first wall, but its still worth it.
Siege Towers
If you are against a Palisade or Bailey, you can go in from the rear using these. Other than that, there isn't much use for these.
Make sure your men can't get hit by bowmen in towers before you start doing anything. Start knocking down the door with your pattering ram, or filling in the moat. Use peasents first for moat filling. Then use Swordsmen USLESS your opponent has lots of Crossbowmen. Also, kill crossbowmen as fast as you can. They do the most damage. After the wall is down, use knights to chase the archers that will try to run back to the flag. Then knock down the 2nd wall. Try to use the battering ram if possible. This is difficult if you are fight a Royal Castle. Try to knock down the side wall so the battering ram can make it through. While the Battering Ram smashes the 2nd wall, check the rest of the castle for other troops that may be hiding. Once the wall is down, mop up.
I hope this helps. If you have anything to add or any comments, mail me at Densoh@hotmail.com.