Last year we had a decent produce of apple pears. But most of the fruits had at least one black spot on the surface. All of those fruits had some sort of bugs inside the fruit. The year before that when we bought the house the produce was not that great but the fruits were not infested with bugs. My question is, what are the common steps to protect the apple pears so that we can get good produce with no bug infestation?
There is a good chance you have Codling Moth infestation. There are pesticides that can help but you can also likely fight back without chemicals by removing much of the fruit early in the year so that none of the pears are touching each other on the tree and by picking up and disposing (offsite) of any fallen fruit ASAP. Also dispose far away from your garden any fruit you pick that has bugs. It may take a couple of seasons to get it under control organically but these steps should help considerably with time.