I am a subcontractor and have not been paid the final balance for my work.
There are three different answers to your question depending on whether the project is on residential property, commercial property, or on a government or municipal owned piece of property.
My recommendation is that you call an attorney.
I agree, without more information this question is fairly open-ended. The requirements and rights can change depending on the type of project, and your position on the payment chain.
However, I can point you in the direction of some resources that may prove helpful:
Feel free to follow up here with any additional information.
Good luck!