There's some main ways to receive funding for public schools and charter schools, at least in California, other states may set it up differently. Private schools by and large rely on directly charging parents tuition.
1) Daily Attendance rate: An enrolled student attends school, it is split per day that the student attends. The school receives more money each day the student attends. Students who are chronically absent are students who miss 15 days throughout the school year or 10% of the school year.
If you attend a school that follows an independent study program, you prove attendance by the work product. I.E., every week, there's an assignment you put to the side with the student's name and signature, date, and class, and you take a daily attendance log as a backup.
2) Direct from property tax revenue. This is why school districts in richer areas are strict with their school boundaries, as they don't get paid if students come out of district.
3) LCAP - Local Control and Accountability Plan, which allows schools to set their budget, and goals for the upcoming school years. Forcast in 1, 2 and 3 years. Also includes information on at risk groups, including students from low income families, special education and English Language Learners. Schools receive more funding currently if they can show via their percentage numbers (eg, you prove a student may come from a low income family if they receive free or reduce lunch pricing).
4) Federal funding, which may be distributed though LCAP, etc.
If you're wondering how schools were funded since schools were closed since March, many states including California waived the attendance requirement for schools to continue to receive funding. I was able to receive my regular salary since school closed in March. We did some extra stuff like breaking students into smaller groups to have them check in, contact parents, etc. Not going to lie, it was hard to contact some families. A number of students took it as a sign that they didn't need to do anything since everything was online.