In the United States, man's obligations to pay child support for a child, is based upon a determination of the paternity of the child.
Paternity, once established, gives rise to multiple rights and obligations, and not merely to an obligation to pay child support.
Paternity determinations are questions of state law for most purposes, including child support, and U.S. states are not entirely uniform on this point. However, state law is only advisory for select purposes of federal law, such as citizenship, which ultimately, for that purpose, is a question of federal law.
In California, in a case involving an unmarried woman and an unmarried man, when there is no putative but legally invalid marriage, but they cohabit, there is only one circumstance where a man is presumed to a parent in the absence of court action or an acknowledgement of paternity, under Family Code § 7611. This is a man "who receives the child into his or her home and openly holds out the child as his or her natural child." Family Code § 7611(d). Both of those requirements must be met for the presumption to apply.
When this presumption does not apply, paternity can be established affirmatively in a paternity action, which typically is resolved with a DNA test, or with a voluntary acknowledgement of paternity in a suitable document.