Both execution and foreclosure may, and do, refer to the process of selling one's property in a situation when the owner cannot continue servicing the debts outstanding in connection with a loan, which is secured by a mortgage.
HOwever, the two terms are not synonymous. Execution, first of all, is a general term for every situation when a judgement is carried into effect by judicial officers. It also includes the foreclosure process as a means of enforcing a judgement.
Foreclosure refers a legal procedure whereby property used as security for a debt is sold to satisfy the debt in the event of default in payment of the mortgage. The process involves the sale of the mortgaged property under the supervision of a court, with the proceeds going first to satisfy the mortgage holder or eventual other creditors, and then the remaining sum to the mortgagor.
The exact procedure for foreclosure sale varies from state to state, but requires a court appointed official or judgement enforcemer officer to conduct the actual sale of the foreclosed property.
Please note that foreclosure can only be carried out after a final and binding court order is obtained by the mortgage holder from a court which has jurisdiction in the matter.