You and Your Roommate are Co-Tenants
If this is the case, you and your roommate are jointly responsible. You both signed a lease agreement accounting you both for liability and repsonsibilites, such as paying rent on time and keeping the house intact.
If your roommate has committed one or multiple of the evictable actions mentioned above, then you must alert the landlord immediately. This is because only the landlord can file for an eviction notice in this scenario, as a co-tenant does not have the legal authority to do so.
If your roommate is indeed evicted, your record may also be vulnerable as the public records will indicate negligence for the entire lease agreement, which includes you. In this case, you should ask your landlord to pardon you from this and release your liability in public records.
You are the Master Tenant
If you are the master tenant, you have sole responsibility on the lease agreement, which makes you fully liable for paying rent on time and keeping the house intact. As such, your roommate will be subletting from you directly, and you will be responsible for your roommate on behalf of your landlord.
Because of this, if your roommate slips up and commits an evictable offense, you are on the line too. For example, if your roommate forgets to pay rent, only you will be held accountable due to the lease agreement being in your name. Thus, it is a good idea to get rid of these types of roommates quickly.
The advantage of being the master tenant is that you likely have a separate agreement contract with your subletting roommate, which gives you authority over them. Use that authority to your advantage! If your roommate is risking your image with the landlord, you as master tenant can personally file to evict them.
Your Roommate is the Master Tenant
If your roommate is the master tenant, it simply means your lease agreement has no connection to the landlord, and is instead completely categorized under your roommate. This means that only your roommate has a contractual agreement with the landlord.
The consequence of this is that you have less authority when it comes to holding your roommate accountable for their actions. You have no legal authority over the lease as a co-tenant, or as a master tenant. In this sense, your roommate and landlord have control over you.
There is still ways to evict, or at least manage your roommate. Simply take up the matters with your landlord, and they will proceed as they see fit. If your roommate is evicted, you will be out of a rental agreement as you are subletting under your roommate, so be mindful of this.