There are important rules and regulations you should be aware of if you are looking to take a loan from your retirement plan.