how to redirect to url.com/wp-admin if url.com/admin is typed in?

Hook into template_redirect, inspect the request URI, and redirect to the return value of admin_url().

add_action( 'template_redirect', function()
{
    $request = untrailingslashit( strtolower( $_SERVER['REQUEST_URI'] ) );

    if ( 'admin' === $request )
    {
        wp_redirect( admin_url() );
        exit;
    }
});

Note: always use admin_url() and the other built-in URL functions, because they will take care of the proper scheme (https or http).