In order to collect the bugs in Tunnel Town, all you have to do is tap the bug on your screen, it will make a sound effect (provided your sound effects are turned on), you will see a puff of dust and the bug you tapped will disappear and be put into your collection. You can view the bugs you have collected by tapping the bug icon on the left side of the screen.
You'll need to look far and wide all over all the layers of earth to find different bugs. Some of them are rare, so keep your eyes out for those, you might even earn a goal by catching enough bugs!
This is how the bug goals work:
All bugs, even rare bugs, count toward a general bug goal, and if they are also rare, they count toward a rare bug goal too. If you are also going for a goal that includes a specific type of bug, it would also count toward that goal, if you catch that specific type of bug.
For example, if you have 3 separate bug goals, one is to catch 20 Bopa type bugs, another goal is to catch 50 rare bugs and the third goal is to catch 500 bugs of any type, and you catch a Bopa bug, which is a rare bug, this would count toward all three of these goals. This means you can get credit for up to three goals by catching one bug!
To see which bugs are rare and how many of all the types of bugs you've caught, as well as the names of all of the bugs, simply tap on the bug icon on the left of the screen to open up your bug collection.