With
typedef struct {
int a;
int b;
} example;
you define an unnamed structure, but define a type-alias example for the structure. That means you can only create instance of the structures using the example "type", like e.g.
example my_example_structure;
With
struct something {
int a;
int b;
} ob;
you define a structure named something, and an instance (a variable) of that structure named ob. You can use struct something to create new variables of the structure:
struct something my_second_ob;
The variable ob can be used like any other instance of the structure:
printf("b = %d\n", ob.b);
Lastly, with
typedef struct foo {
int a;
int b;
} bar;
you define a structure named foo, so you can use e.g. struct foo to define variables. You also define a type-alias bar which can also be used. Like for example
struct foo my_first_foo;
bar my_second_foo;
The general syntax for typedef is
typedef <actual type> <alias name>;
In the last case of your examples, the <actual type> is
struct foo {
int a;
int b;
}
and the <alias name is bar.