There are several levels of inheritance going on. The SampleExternalModule.ascx file inherits from SampleExternalModule.SampleModuleControl class which lives in its code behind file SampleExternalModule.ascx.cs. But if you look at the code in this file you see it inherits from SiteModuleControl
public partial class SampleModuleControl : SiteModuleControl
the only difference with a normal User Control created by VS, it would be
public partial class SampleModuleControl : UserControl
SiteModuleControl inherits from UserControl and adds things needed to plug in to mojoportal.
Yes, the post build copies file to the correct location under the web project. The main thing is it copies its compiled dll (and any dlls it depends on) into the bin folder. You can have it put your .ascx file wherever you like. Notice how WebStore has all its files in a WebStore folder (both within its own project and when it copies to Web/WebStore. Thats a good way to keep your custom code organized and separate from the core of mojoportal.
So wherever your post build event puts the .ascx file, you set the correct path when you install it under Administration > Feature Modules
Notice that the Sample External Module is not installed in the site by default but you can install it by going into Administration > Feature Modules - Add New. For the control path enter
Modules/SampleExternalModule.ascx
and name it Sample or whatever you like. Now it will appear in the feature list and you can add instances of it to pages. Of course its not very useful but you can see how it plugs in.
Hope it helps,
Joe