How to call a function on change in Enum dropdown list?
Use the update argument of the EnumProperty.

import bpy

def maskIt(self, context):
    print('called and changed to,', context.scene.MyEnum)

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        layout.prop(scene, "MyEnum")

def register():
    bpy.types.Scene.MyEnum = bpy.props.EnumProperty(
        items = [('Group 1', 'Group 1', 'Group 1',1), 
                 ('Group 2', 'Group 2', 'Group 2',2),
                 ('Group 3', 'Group 3', 'Group 3',3)],
        name = "Mask the MESH",
        default = 'Group 1',
        update = maskIt)

    bpy.utils.register_class(LayoutDemoPanel)


def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel)
    del bpy.types.Scene.MyEnum


if __name__ == "__main__":
    register()