Adding during the boil has the benefit of sanitizing the fruit but I have found it adds an odd cooked fruit flavor to my beer that I don't enjoy. If I want fruit flavor in my beer I want it to taste fresh and usually tart. For me it has always worked out best to add the fruit in a secondary container after primary fermentation.
How much to add is much more difficult to know before hand. The only ways I have found that work are to make a guess on the low end first and if it needs more fruit flavor next time you will have a base line to work with. A good beer with to little fruit flavor is always better than a beer with to much fruit flavor that can have the effect of thinning a beer and making it wine like. I usually start with 1 lb per gallon and then increase if I need to.
For preparation of the fruit it is whether to cut it up or use whole and whether or not to try and sanitize the fruit. Most of the time I freeze the fruit and then chop up in small pieces. I rarely worry about sanitizing the fruit but most of my beers or sour or funky so I don't worry about it.
I then start tasting the beer after 3 weeks on the fruit to see if it has the flavor I look for. Most of the sugar from the fruit should have fermented out by then so I don't have to worry about bottle bombs.
For this sour cherry stout I hand pitted 5 lbs of sour cherries that I added to a Imperial Stout that has been fermenting for 3 weeks.
I then transferred the Stout on top of the cherries in my Speidel Fermenter
Waiting for the flavor to develop