Using a t-test vs. a z-test The mean weight of the average man is 166 pounds. One can create a hypothesis test to decide whether the mean weight of men in a workout club is above the average. $H_0:\mu\leq166$ versus $H_1:\mu> 166$. The 25 people in the  club have a mean weight of $170$ pounds and standard deviation of $5$ pounds.
My question is would I use a z-test or t-test for this scenario?I know the standard deviation is known, but am I supposed to know the standard deviation of all men in order to use a z-test?But also the sample size is less than $30$ and I read that a good rule of thumb is to use a z-test when the sample size is less than $30$.
 A: Even when the sample size is small, if the population standard deviation is known and the data are known to be normally distributed, the $z$-test applies, not the $t$-test.  This is because the sampling distribution of the sample mean of normally distributed observations is exactly normal, owing to the fact that when $X_1, X_2, \ldots, X_n \sim \operatorname{Normal}(\mu, \sigma^2)$ are iid normal, then $$\bar X = \frac{1}{n} \sum_{i=1}^n X_i \sim \operatorname{Normal}(\mu, \sigma^2/n).$$  This is not an approximation.
However, if $\sigma$ is not known, then the $t$-test is used because the test statistic is $$T \mid H_0 = \frac{\bar X - \mu_0}{s/\sqrt{n}} \sim \operatorname{StudentT}(n-1)$$ where $\mu_0$ is the hypothesized mean under the null, and $s$ is the sample standard deviation calculated from the observed data.  This is exactly true whenever the $X_i$ are iid normal, regardless of the size of $n$, but when $n$ is sufficiently large, the Student $t$ distribution approaches the standard normal.
When the observations are not exactly normally distributed, then the Central Limit theorem kicks in for large samples to provide a asymptotic distribution of the test statistic.
In your case, the standard deviation that is provided corresponds to the sample, not the population.  This is because if it were a population parameter rather than an estimate, it would have been specified along with the population mean; e.g.,

The mean weight of the average man is 166 pounds with a standard deviation of 5 pounds.  One can create a hypothesis test ...

This phrasing would imply that the standard deviation for the population is known in advance.
Since it is implied that the SD was estimated from the sample, we may apply a $t$-test for the calculation, understanding that the test statistic is asymptotically Student $t$ distributed because nothing is said about the distribution of men's weights being normal.  Thus, the Type I error control of such a test is approximate, with potential for error increasing with increasing deviation from normality.  A highly skewed distribution of male body weight in the workout club members, for instance, could result in an incorrect inference because at $n = 25$, the sample mean may not be sufficiently close to normally distributed.
However, it is a reasonable assumption that body weight is well-modeled by a normal distribution, so there is little reason to not use a $t$-test and instead use a nonparametric test.  The former would have better power to detect a difference from the null; the latter would guarantee Type I error control, and might be useful as a sensitivity analysis to check the robustness of the $t$-test under deviations from the assumption that the data are normally distributed.
As for how the hypothesis is specified, it is perfectly acceptable to write
$$H_0 : \mu \le 166 \quad \text{vs.} \quad H_1 : \mu > 166.$$  The test statistic, however, would be calculated as $$T \mid H_0 = \frac{170 - 166}{5/\sqrt{25}},$$ for the reason that if $H_0$ is rejected for the largest possible $\mu_0 = 166$, then it will also be rejected for any smaller $\mu_0$; hence choosing the rejection region such that $$\Pr[T > t_{\text{crit}} \mid H_0] \le \alpha$$ for $\mu_0 = 166$ ensures that the Type I error is at most $\alpha$ for any choice of $\mu_0 \le 166$.
