The random variable $Y$ describes a relationship between events and the corresponding probabilities of those events. In more practical terms, a random variable describes a data-generating process. When you generate a random data point that is described by the random variable $Y$, the probability distribution of $Y$ describes the probability distribution of values that can result.
You can think of a "population" as an infinite reservoir of values drawn from $Y$. Sampling from a population is analogous to repeatedly drawing new values from $Y$. A sample of size $N$ is a size-$N$ collection of individual draws from $Y$.
The sample is clearly not the same thing as the random variable itself, so we need a different notation for it. Let's call it $s = \{y_1, y_2, \dots, y_N \}$. Each $y_n$ is a single draw from $Y$. The sample mean is a single number. Let's call it $\bar s$. It is the mean of the sequence $s$, i.e. $\bar s = \frac{y_1 + y_2 + \dots + y_N}{N}$.
We can make an interesting observation here! $N$ independent, identical draws from a random variable $Y$ is the same thing as one draw from each of $N$ independent, identical random variables $Y_n$. Now, we can talk about the sample itself as a random variable $S = \{ Y_1, \dots, Y_N \}$.
Note the difference between
$$
s = \{ y_1, \dots, y_N \}
$$
and
$$
S = \{ Y_1, \dots, Y_N \}
$$
$S$ is random: it is a sequence of random variables. $s$ is not random. It is the realized value of a draw from $S$, i.e. a sequence of realized values of draws from $Y_1, \dots, Y_N$.
Therefore the sample mean itself can be restated as a random variable $\bar S$.
Compare
$$
\bar s = \frac{ y_1 + \cdots + y_N}{N}
$$
with
$$
\bar S = \frac{ Y_1 + \cdots + Y_N}{N}
$$
$\bar s$ is just a number: it is the mean of a sequence of numbers $y_1, \cdots, y_N$. But $\bar S$ is a random variable! Specifically, it is a statistic, a single quantity that is calculated from a sample. The value of a statistic for a specific sample is a realization of the distribution for that statistic.
Being a random variable, draws from $\bar S$ are described by a probability distribution. The distribution of sample means, across all possible samples, is described by the distribution of $\bar S$. This distribution is the sampling distribution of the mean.
With regard to your first question, you are probably confused between the random variable $Y$ and the matrix $Y$. It is an unfortunate clash in notation that random variables and matrices are both conventionally written with capital letters. It is often mathematically convenient to express samples as matrices, so that you can do linear algebra operations on observed data (to generate estimates from that data, e.g. with ordinary least squares). The matrix $Y$ would be a matrix of observed values. Take care to observe the context, to avoid this confusion.
To address your 2nd question, there are many ways to derive or describe a sampling distribution. One possible technique is called resampling: repeatedly draw samples from a population that is distributed according to $Y$, and measure the sample mean in each of those samples. The distribution of those sample means should follow the sampling distribution of the mean.