The thread 'What's my most efficient use of spell slots to maximize my AC' sparked this line of thought:
Is a curtain 'cover', even if enemy spell casters, archers (etc.) know a PC is behind it? For example: in the middle of combat, could a character summon an unseen servant to hold a banner/flag/cape up--in the middle of a room or field--and gain 'cover'? Is simply being hidden so that enemies could no longer actually lay eyes on the PC, what 'cover' involves?
Or does the object giving cover have to be substantial enough to stop arrows, etc.? Would a barrier give 'cover' vs. magic missiles simply by blocking visual sight of the target, but not give (as much?) cover if arrows/javelins/etc. are being launched?
Could the PC cast (some) spells from behind the curtain if there was a small eye hole to peek through? To what extent would that eye hole undo the 'cover' provided by the curtain?
My original focus was on the unseen servant holding up the curtain and other threads (such as 'Unseen servant use in combat') touch on this, but don't directly answer my questions, as far as I've seen. But from comments/etc. I'm refocusing on the question of what 'cover' means, with the unseen servant in the example to give a specific example around which to focus discussion and show a practical application of the idea.
About 'cover':
The 5e PHB p.196 says,
A target has half cover if an obstacle blocks at least half its body.
A target with total cover can't be targeted directly by an attack or spell, although some spells reach a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.
More was said there on the topic, but I didn't see a clear statement against the idea that a PC has cover simply by being hidden from view.
...On the other hand, the objects mentioned that blocked sight of the PC were more substantial than a curtain: tree trunks, low walls, furniture, and other creatures.
My thoughts: an arrow shot at a curtain would pierce it and could wound the person behind it, but doing the latter would be harder because of the curtain. Thus, a curtain = at least some degree of cover.
A magic missile spell depends on the caster being able to see the target (5e PHB p257, emphasis mine):
Each dart hits a creature of your choice that you can see within range.
That seems like a reasonable basis for saying the PC behind the curtain could not be hit with magic missiles.
Other spells might not be as specific and could be figured out on a case by case basis.
As far as whether the eye-hole would allow the PC to cast spells from behind the curtain, from that reading of that spell, I would say it would allow casting magic missiles from behind the curtain.