First of all, all four stub area types (Stub, Totally stub, NSSA, and totally NSSA) are characterized by the fact that they only have a single ABR. Remember, an ABR is an OSPF router that has two or more areas connected to it. This essentially means that there is only one entry and exit point from that particular area. This also means that area 0 can never be a stub network, because it is the backbone network to which all stubs connect. Remember that all ABRs must have at least one interface in area 0 for OSPF to function correctly. For a refresher, take a look at the following lesson:
Since all stub areas have only a single ABR, this means that these commands must be implemented on the ABRs that connect to the stub network in question, and must be applied to the area connected to that ABR which is a stub.
Looking at this topology from the lesson:
If we want to configure area 1 as a totally stub area, the command must be implemented in the ABR connected to that totally stub area. R2 is the ABR connected to that totally stub area, and by definition there is only one ABR in area 1 (otherwise it would not be a stub). Secondly, the command must be implemented on Area 1. So in R2, you would implement:
area 1 stub no-summary
Note that this command must be implemented only on the ABR. R3 is not an ABR, but must be configured as part of a normal stub area, this is why the command
area 1 stub is configured there.
I hope this has been helpful!