Why my CPT does not appear on the dashboard menu when i activate the plugin?

The problem is that you’ve set the value for 'public' incorrectly. That argument is a boolean, meaning it’s true or false, and in PHP these need to be written without quotes to be correct:

register_post_type(
    'magazine',
    array(
        'labels' => array(
                'name' => 'magazine',
        ),
        'public' => true,
    )
);

For the post type to appear in the admin sidebar, 'show_in_menu' needs to be true. The default value of 'show_in_menu' — if it’s not provided — is the same as 'show_ui', which itself defaults to the value of 'public'. this is why 'public' being set incorrectly was causing the problem.

The reason Pravin’s answer works is because he’s manually setting 'show_in_menu' to true. But while this makes the post type appear in the admin menu, it’s still not set to public correctly, which means that the post type still won’t be publicly visible. The 'show_in_menu' argument is not required if 'public' is set correctly.