Although it's possible to control or even eliminate most plant pests, it is easier and much more effective to prevent them.
One way to prevent insects from invading your house is to avoid bringing them in. Although nobody would ever purposely bring plant pests into their home, bugs often hitch a ride on plants that are brought into the house. Even plants purchased from the best greenhouses can harbour insect eggs or larvae, and any plants that spend the summer outside can easily cause a problem when they are brought in for the winter. Thoroughly washing the leaves of these plants will minimize the number of insects that remain on them, and keeping the plant separate from other plants for a couple of weeks will allow you to deal with any pest problems before they spread.
Avoid attracting bugs to your plants by removing any dead or dying leaves and disposing of them. Dead plant materials that are left lying around attract the types of pests that feed off them, and could harbour eggs or larvae as well.
Sometimes insect eggs or larvae can also be present in soil or potting mixes. This problem can be avoided by sterilizing the soil before planting. This can be done in the oven. Set the oven to about 200ºF and place the moist soil in a covered container. Use a meat thermometer to monitor the temperature. The soil must be heated to 180ºF and maintained at that temperature for 30 minutes. Do not let it get hotter than 200ºF, as this can make the soil toxic. Although I have never tried this, apparently it will make your entire house smell very strongly (and unpleasantly) of dirt. Using a microwave apparently is less smelly and equally effective, but since microwave ovens vary in power, it may need to be more closely monitored. Place moist soil in a loosely covered, microwave-safe bowl and heat on full power for about 90 seconds per kilogram of soil, or 45 seconds per pound. If you are using a plastic container, such as a yogurt container, poke a hole in the lid to allow steam to escape. Allow the soil to cool, covered, in the microwave before removing it. Another method of sterilizing the soil is to pour boiling water over it, but you will need to be fairly creative to prevent your soil from simply washing away.
If you are going to sterilize your soil, you might as well also sterilize seedling trays, pots, and any other equipment you might have. This is fairly easy compared to sterilizing soil: simply wash them clean and rinse them in a 10:1 solution of water and bleach (ten parts water to one part bleach). This is good practise for any previously used potting containers, but especially ones that had insect pests in them and may still be harbouring eggs or larvae.
Try not to overwater or underwater plants, as too dry or too wet conditions can allow certain types of pests to flourish. Good growing conditions also create healthy plants that are more able to withstand insect attacks. Checking plants every couple of days can give you an early warning of any problems, allowing you to keep a small problem from becoming a big one. Several plant pests are attracted to the colour yellow, so hanging a yellow-coloured card coated in a sticky substance, such as Tanglefoot or double-sided tape, can catch some pests and give you an early warning of their invasion.