Siman 37
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א גָּדוֹל שְׂכַר מִצְוַת תְּפִלִּין, וְכָל מִי שֶׁאֵינוֹ מְנִיחָם הוּא בִּכְלַל פּוֹשְׁעֵי יִשְׂרָאֵל בְּגוּפָן.
1 Great is the reward for the mitzvah of tefillin, and anyone who does not wear them is included in the group of "sinners of Israel" [sinning in their] bodies.
ב מִצְוָתָן לִהְיוֹתָם עָלָיו כָּל הַיּוֹם אֲבָל מִפְּנֵי שֶׁצְּרִיכִים גּוּף נָקִי שֶׁלֹּא יָפִיחַ בָּהֶם, וְשֶׁלֹּא יַסִיחַ דַּעְתּוֹ מֵהֶם, וְאֵין כָּל אָדָם יָכוֹל לִזָּהֵר בָּהֶם, נָהֲגוּ שֶׁלֹּא לַהֲנִיחָם כָּל הַיּוֹם. וּמִכָּל מָקוֹם צָרִיךְ כָּל אָדָם לִזָּהֵר בָּהֶם לִהְיוֹתָם עָלָיו בִּשְׁעַת קְרִיאַת שְׁמַע וּתְפִלָּה.
2 It is a Mitzvah to have them [tefillin] on all day, but because they [tefillin] need a clean body [meaning that] he does not pass gas, and [further require] that one not distract his mind from them, and not every person is able to be careful with them, the practice is not to wear them all day. Nevertheless every man needs to be careful with them that they should be on him during the reciting of Shema and Tefilah [aka Shemoneh Esreh].
ג קָטָן הַיּוֹדֵעַ לִשְׁמֹר תְּפִלִּין בְּטָהֳרָה שֶׁלֹּא יִישַׁן בָּהֶם וְלֹא יָפִיחַ בָּהֶם, הַגָּה: וְשֶׁלֹּא לִכָּנֵס בָּהֶן לְבֵית הַכִּסֵּא (רַשִׁ"י פ' לוּלָב הַגָּזוּל) חַיָּב אָבִיו לִקְנוֹת לוֹ תְּפִלִּין לְחַנְּכוֹ: הַגָּה: וְיֵשׁ אוֹמְרִים דְּהַאי קָטָן דַּוְקָא שֶׁהוּא בֶּן י"ג שָׁנִים וְיוֹם אֶחָד (בַּעַל הָעִטּוּר) וְכֵן נָהֲגוּ וְאֵין לְשַׁנּוֹת (דִּבְרֵי עַצְמוֹ):
3 A minor who knows to guard tefillin in purity, such that he will not sleep or flatulate while wearing them Rema: and not to enter the bathroom with them [based on Rashi in the chapter of "The Stolen Lulav"] his father is obligated to acquire tefillin for him in order to train him [in the commandment]. Rema: "And some say that this 'minor' is only if he is 13 years and one day (Ba’al HaIitur). And so is the custom and one should not change from it.