Need help understanding pagination parameters

The following code line:

$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;

is using the ternary operator ?:

It’s a shorthand notation for

if( get_query_var( 'paged' ) )
    $paged = get_query_var('paged' );
else
    $paged = 1;

This can in fact be simplified further, by using the the second input parameter for the default value, namely:

$paged = get_query_var( 'paged', 1 );

See the get_query_var() function definition here.

What are query variables?

Let me quote the Codex:

Query vars define a query for WordPress posts.

When ugly permalinks are enabled, query variables can be seen in the
URL. For example, in the URL http://example.com/?p=1 the p query var
is set to 1, which will display the single post with an ID of 1.

When pretty permalinks are enabled, URLs don’t include query
variables. Instead, WordPress transforms the URL into query vars via
the Rewrite API, which are used to populate the query.

I see you’ve added more code to the question:

$catpage = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$catnum = 3;
$offset = ($catnum * $catpage) - 3;

Let’s check out the category archive for a category called blue:

When the paged query variable isn’t defined, on the first page

http://example.tld/category/blue/

then we set it as 1 and then:

offset = 3 * 1 - 3 = 0

When the paged query variable is 2 (on the second page)

http://example.tld/category/blue/page/2/

then:

offset = 3 * 2 - 3 = 6 - 3 = 3

When the paged query variable is 3 on the third page

http://example.tld/category/blue/page/3/

then:

offset = 3 * 3 - 3 = 9 - 3 = 6

etc