You have to find the class you want to remove. Blender keeps all of their interfaces in the scripts/startup/bl_ui directory. If you look through those scripts you will find every panel, menu, and header defined in Blender. Lets say you want to remove the “name” panel in the 3D Viewport. In the scripts/startup/bl_ui/space_view3d.py module you will find a class called VIEW_PT_view3d_name. All you need to do is add this to your add-on: