Creating a Mask that doesn't move with layer and stays Invisible.

I have done several searches on how to create a mask that doesn't move with the Layer. It seems like its not possible to "lock" the mask down while the layer moves, and I need to "track matte it." It seems like this is the process.

Create a solid
Copy the mask to that solid
Change the track matte to - alpha something
Then put that solid above the layer I want to mask.
Delete mask on original layer.

Here is where I run into the problem. What I'm trying to create is a text fly out as if its coming from behind a thin line. I'm also trying to create the illusion

There are a few concerns:
1. I'm not sure which track matte option to use. And is there a specific blending option I should choose for that layer?
2. What color should that track matte layer be?
3. When I create a mask to the solid, it only covers the mask (obviously), but that then is the problem. I can see the solid that is unmasked which covers the important elements inside the comp.

Another way to restate my questions is
Can I create a mask that only covers parts of 1 layer and is nonexistent to the other layers in the comp. And can I create multiple mask for multiple layers?

Thanks for reading. This is my first time posting, so please don't rip me to pieces.

1. I'm not sure which track matte option to use. And is there a specific blending option I should choose for that layer?
The different options would depend on what you're doing.
You shouldn't have to mess with blending options.

2. What color should that track matte layer be?
As long as you're using it as an alpha matte and not a luma matte, it doesn't matter.

3. When I create a mask to the solid, it only covers the mask (obviously), but that then is the problem. I can see the solid that is unmasked which covers the important elements inside the comp.
When you make the solid a track matte for your text, it should automatically be made invisible.

Can I create a mask that only covers parts of 1 layer and is nonexistent to the other layers in the comp. And can I create multiple mask for multiple layers?
A mask that covers part of 1 layer and doesn't effect any other layers is a normal mask on a layer. If you want it separate from a layer, it's a normal track matte.
Multiple masks for multiple layers is possible, depending on how you're doing it and what you're trying to do, you may need to precompose some elements.

In addition to the link I gave earlier on track mattes, I'm going to suggest you go through all the resources here. They will help you get a better grounding in AE.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

@Szalam I actually did read the reference on track mattes. But I figured out the problem!

I was changing the TrkMat of the solid with mask layer to Alpha matte(inverted) instead of changing the TrkMat on the Text layer or what I was trying to mask layer. And then you also need to turn off the opacity of the track matte mask layer(which normally happens by default when you change the trkmat settings)

Here are my "timeline"

1. The shape that I want to have stuff fly out from behind.
-in my case it was a thin line
2. Solid layer with the mask (hide layer/turn off eye)
3. The text that I want to fly out from behind layer 1. TrkMat is set to Alpha Invert.