WordPress How to register widget correctly

Solution:

add below code for register widget

function Cat_register_Widget() {
        register_widget( 'Cat_Widget' );
    }
    add_action( 'widgets_init', 'Cat_register_Widget' );