Hey there, thought I'd post here too, since I got the same problem. I just bought my guitar yesterday, I really need help

So, I need an explanation for this:
Riff 1:
|-----------------|-----------------|-----------------|
|-----------------|-----------------|-----------------|
|-----------------|-----------------|---------3-3-3-1-|
|-3-3-3-3-3-3-3-3-|-3-3-3-3-3-3-3-3-|-3-3-3-3---------|
1 & 2 & 3 & 4 & 1 & 2 & 3 & 4 & 1 & 2 & 3 & 4 &
What do the numbers represent?
On which fret you have to put your finger on.
I need some detail though

I understand the 3's, the third fret, but what about the 1&2&3&4&...?
|-----------|-------------|
|*---------*|-------------|
|*-r-r-r-r-*|-------------|
|-----------|-------0-1-2-|
1 2 3 4 1 2 3 & 4 &
Also, what do the r's mean?And the *'s?
TL;DR, I need explanation on everything, really
