The javadoc for Timer tells you what that constructor is about - it takes an int and an instance of ActionListener.
So, to answer your first question, in the example code from Oracle, timer = new Timer(speed, this)
happens within the init method of that Applet that makes up the example UI thingy. Thus: this refers to the "current" object (see here for more details), being that Applet object the whole method "belongs" to.
And that only works because that example class TumleItem is declared as
TumbleItem extends JApplet implements ActionListener
.
For the record: understanding what this is about is absolutely basic stuff. If you don't know what this is about, then you shouldn't be engaging in UI coding yet. Learn to crawl before you try to run.
For your second question: for each instance of a Timer you want to use, you need an ActionListener that you can pass in. The old-school way of doing that would be to use anonymous inner classes, like
timer = new Timer(someSpeed, new ActionListiner() {
@Override
public void actionPerformed(ActionEvent evt) {
System.out.println("Whatever");
}
}
Finally: that one example from Oracle is using Applets, and simply spoken: Applets are dead technology. Don't get too hung up on them; you better avoid spending time on those completely.