I am working on a project for school and would like to know if it would be in the public domain.
If your country is a signatory to the Berne Convention, then you automatically own the copyright to anything you write, from the moment you write it, with some exceptions:
If you're being paid to write it, the work may qualify as "work for hire", in which case the copyright may be owned by whoever is paying you. Ask a lawyer (but not your employer's lawyer).
Some universities (for example, MIT) claim ownership of "Intellectual Property" developed using university resources (for example, the campus wifi network). Whether this claim applies to schoolwork is unclear. Ask a lawyer (but not the university's lawyer).
In any case, unless you (and/or your employer and/or the university, if they claim ownership) release it into the public domain, it isn't in the public domain.
I don't know a university that has good written policies on school work. In the US, it is likely that you own the copyright on the work. I think the assumption is that by handing in the work you are essentially agreeing to a copyright transfer agreement with the professor/department/university. The extent of the transfer must allow copying and distributing the work because the professor reasonably needs to be able to give it to a grader and make a copy to keep for the school records. It might need to be passed through a 3rd party plagiarism detection app. It might be eventually bundled with other students work as examples of past answers (and possibly sold for a profit). There may also be a tacit agreement that you will not distribute your work without the departments consent (i.e., not post your solutions online or hand it in for another class). As I said, I doubt any of this is written and most might be covered by fair use.