To put it simply, if you have an assembly open and are in Edit Part mode, if you create a relationship to a different part in the assembly, you have now created an in-context piece.
Any of the normal sketch relations - coincident, concentric, convert edges (my favorite), etc. that are used with a piece of geometry in another part creates an external relationship (another name for in- context).
Another method is when you create Extrudes, Cut-Extrudes, etc. where you use Up to Surface, Vertex, Offset from Surface etc. where the surface is from another part in the assembly creates an external reference.
The main issue you need to be aware of is that these external relationships can only be updated in-context of the assembly where they were created. You HAVE TO HAVE the assembly open if you want to see these relationships work properly. These parts should also not be used in more than 1 assembly - which lends itself great towards one- off parts.
There's a good rule of thumb list on Matt Lombard's web site:
formatting link
Click on Rules of Thumb and then select In-context relationships.
Good luck,
Steve O