Take a look at the pathfinder panel.
See Window-menu and see manual on how to use it.
The Pathfinder panel is probably the best way to join, divide, etc. most objects, but not necessarily to do the two jobs you cite as examples.
The 'donut' is most easily achieved, after the two circles are aligned as you want, by selecting both and hitting Command-8 (Make Compound). This knocks the center circle out of the larger.
The second, the lines, may resist joining because they are each within their own group. To join line segments, you must select two endpoints of two ungrouped paths (or paths in the same group). So, choose your lines, ungroup them, then try to join them.
To join line segments, you must select two endpoints...
In Illustrator CS5 it is finally (literal decades late) not necessary to tediously select endpoints to join paths at their nearest ends.