Going about your life after an affair is something that both of you must work out together. To be able to recover from this, you need to work on the likely reasons for an affair to have happened. If you were to work only on the symptoms, you will not be fixing the problem; you would only make short term fixes.
The one that was doing the cheating must be honest with their partner about the affair, and the events that led up to it. Bringing this information out should help rebuild trust, which has been damaged because of this incident.
Discuss why each of you feels your marriage is worth saving. Because there was an affair it does not mean it's the end of your marriage, it will be difficult for the one cheated on, but many marriages have gone on to be very successful. Look at all the positive points of your marriage that have made it good, such as how much you have loved each other and your kids and all the wonderful times that have been had.
Remember that there are stages that each of you will go through after the affair. There is no absolute timeline for these stages nor can you make one. Each stage must be dealt with as time goes by. You will start with the shock and disbelieve that this could have happened to discovering how to redefine your relationship. Trust will have to be reestablished again and this will only happen when your spouse has proven it over time.