Subletting means taking in another tenant—commonly done to reduce the cost of monthly rental to the original tenant. If you create a lease agreement for your apartment/house/townhome and your lease prohibits subletting, the tenant may not sublet and if he does, you as landlord must act in accordance with your lease agreement to correct the violation.
Subletting may also violate state and city building codes. In order for a tenant to live in a particular space, it must meet county code enforcement requirements including number of square feet per person, number of entry and egress points (doors, windows etc.), windows in bedrooms, fire alarms and/or sprinklers? How about heat? An owner/landlord can be cited for allowing someone to live in this space and could face civil and criminal penalties if injury should occur to a tenant living in substandard conditions.
If you have to go so far as to evict the tenant, make sure you list all those living on your property—not just the original lease in order to ensure the eviction will apply to all those living in your property. If the tenant moves out and leaves you with the occupant, that tenant has not vacated the unit because someone is still living there.