The verb attend means to be present, to listen, or give care or attention to. You can attend your family reunion, attend to a project you've been ignoring, or attend to your teacher's voice.
When you use attend as "pay attention" or "take care of," it's followed by "to." When you use attend as in "attend a party," you don't. If you attend a political rally, you'll want to attend to what the politicians have to say. When you take attendance, you are checking which students have chosen to attend class, i.e. who is in attendance.