They black dots are fungal most likely in-terms of a cause. This orchid has been neglected for quite some time. It has not been getting the right amount of water. The basket it is in is too large.
The plant has been attacked by insects, maybe scale, mealybugs and others. The black marks are from a secondary attack by a fungus leaving behind the black marks.
I would repot it into a more appropriate pot with fresh media, reduce the light to bright with perhaps an hour or so of morning sun. With proper watering, water it well and dry out a little, should trigger now growth.
As it sits there right now, I have no idea as to what it is exactly. My best guess is that it may be a member of the genus Coelia, a Bifrenaria maybe, one of the less popular members of the Oncidium Alliance? I just can't say with certainty.
But I am certain that it is solvable.