What would you recommend I check most carefully?
There are NUMEROUS threads already on this site about what to look for in a used boat. Do some internet searches and you'll come up with tons of info. I'm not going to rehash it all in full detail again.
In general, the hulls need to be sound with zero soft spots or structural damage. All aluminum extrusions (mast, boom, crossbars) need to be sound with no dents, cracks, or excessive corrosion. Sails should be at least servicable with no tears, heavy wear, heavily corroded fittings, or missing battens. Rudder system should be complete and functional. Standing rigging should be no more than 5 years old and all hardware should be in good condition. The boat should include all parts necessary to rig completely and properly.
It is highly unlikely that a $500 boat will meet all these criteria. Best case scenario, it takes several hundred bucks to bring the boat up to servicable condition. Worst case scenario, you blew $500 hauling away someone else's junk.
Best to educate yourself a little before just jumping into this.