I recently bought my first SLR camera and lens for it and I have questions about how they interact.

My lens attaches on, and I can use the focus on the lens itself, but if I use the auto-focus, does it adjust the lens focus, or is there a secondary lens in the body that gets adjusted?

Same with the aperture settings, is this changing on the attached lens, or is there another lens inside?

If it is changing the attached lens, how do the two connect? I can not see any obvious connection other than the mechanism holding it in place.

I am just curious how they work together.