An xreference in AutoCAD is merely another AutoCAD drawing file that is viewed within the current drawing. Unlike a block, its data is not held within the "host" drawing, except for information about its insertion point, scale, layer, and where AutoCAD can find tthe file. When the host drawing is closed, the xref is essentially not "in" the host drawing's dwg file.
Each time you open a drawing that has xreferences, AutoCAD goes through the list of xreferences in the opened drawing, finds them, and inserts them into the drawing, in the statte in which they were last saved (which layering exceptions as noted below). As another answerer mentioned, unlike blocks, they cannot be edited within the host drawing\, but must be opened on their own, altered, sved, and then be reloaded in the host drawing, either by re-opening the host, or reloading the xref manually
Xreferences are used to make your work more efficient and saves disk space as a side-benefit. Most people use xreferences for geometry the appears over and over again in many separate drawings, items such as floor plans and title blocks and even wall sections.
When xreferences are first pulled into a drawing all the layers that were on on the xref when it was last saved are on by default. However, within the host drawing the xreference's layers, which are prefixed with the xref's name (which is by default the drawing's name but can be changed) can be set for the host drawing - ceiling layers for example can be turned off, or equipment, etc, depending on what type of sheet you are creating. As long as the AutoCAD variable VISRETAIN is turned on (set to 1), after that the xref will always appear in the host drawing with only the layers on that you want to see. An exception is that new layers created in the xref will appear and will have to be turned off in the host.
So in the xref'd drawing itself you could have items that show up in many types of plans - celing grids, plumbing fixtures, windows, doors, etc - but in the sheet that xrefs them only those items you want to see will show up.
A good practice is to put the xref on its own layer and, after you have it looking like you want it, lock the layer. That way, when you use a selection window in an AutoCAD command, the xref won't be selected and you won't have to constantly de-select it.
Another good practice is to keep the xrefs in the same folder as the drawings that host them. Then when you insert an xref for the first time make sure you do not "retain the path" (there's a check box for this in the xref dialog box). This way AutoCAD will search for it first in the host drawing's folder (actually it looks first in what's called the "working directory" but usually that's AutoCAD's program directory and no one has drawings there). Then as long as you keep the host and xref'd drawings in the same folder, you can move them wherever you want and AutoCAD will always find the right drawing to xref.
I think this is still the same in the lastest AutoCAD verions, but on thing you should not do when using xrefs without paths - and that is to double-click on a file in explorer to open it. When you do this thte double-clicked drawing's folder will become the working directory. That's OK for the first drawing you work on that day, but is you open a drawwing from another directory that has xrefs of the same name that don't have paths, AutoCAD will find the xref's in thte first drawing's folder. Just have to be careful and open all drawings from withiin an AutoCAD session.
AutoCAD's newer versions attempt to hide the background process from the user by using "Sheet Sets" but it's good to know what's going on behind the scenes in case problems arise.
There's more, but that's enough to start.