An assignment happens when a tenant permanently leaves a rental unit during the course of the lease. The tenant gives up all rights as a tenant and has no further responsibilities toward the landlord.
Subletting, on the other hand, can be a temporary arrangement. By subletting your apartment, you preserve your right of occupancy: when the sublet is finished, you have the right to return. But when you sublet, you also assume some responsibilities. You will be responsible for any damage that the subletter may cause or for non-payment of rent as legally you are still the main tenant.