How does the neocortex distinguish between perception and imagination? From my understanding, the neocortex performs both perception and imagination/planning within the same hierarchical structure. During perception, an area of the neocortex receives current input from sensors and decides on motor actions to execute. During imagination, an area replays previous inputs, or operates on potential future inputs for planning. Actions don't actually get executed during planning.

On the one hand, it seems like both perception and planning are in part executed by the same neural structures. It seems intuitive that the same abstraction mechanism needs to be reused to arrive at the same high-level representations. On the other hand, it seems like the brain still needs to distinguish between them, for example to not executed imagined actions.

The two processes certainly affect each other. Perceiving a difficult situation can cause planning, perception can cause an association to imagine another situation, or imagination sets filters on what we perceive. Are there any explanations if and how the neocortex implements both perception and imagination/planning within the same structures?


Are perception and imagination states that the neocortex areas switch between, or can they be carried out simultaneously? Can multiple areas be involved in planning at the same time? 
When an area sends information to another one, how does it signal whether this was perceived or imagined information? 
Is there less of a distinction between the two than I'm thinking?
Short answer
Perception and imagination in the visual system use pretty much the same neural machinery, but in opposite directions - perception goes bottom-up, from the periphery to the central nervous system, while imagery uses the top-down approach, travelling from the higher associative cortices to the lower visual areas in the brain.   

Background
The distinction between perception and imagination has received a lot of attention in the visual sciences. For example, imagery in congenitally blind individuals versus late-blind individuals is an interesting distinction to make with far-reaching consequences in certain fields of research (e.g. (Kupers et al., 2001)

Perception in the visual system goes from the periphery (retina), via the brainstem (LGN) to the striate cortex (V1) and higher extrastriate areas (V2-V7, see Fig. 1). 

Content-related activation during imagery in visual extrastriate cortex is thought to be governed by “top-down” mechanisms in parietal and frontal cortex that mediate the retrieval of object representations from long-term memory (Ishai et al., 2000). Visual imagery and visual perception draw on most of the same neural machinery. However, albeit the vast majority of activated areas are activated during both conditions, the spatial overlap is neither complete nor uniform. The overlap was much more pronounced in frontal and parietal regions (higher visual areas) than in temporal and occipital regions (lower visual areas) (Ganis et al., 2004).

I can't supply you with references on your following questions, but I wouldn't see any reason why the brain couldn't... 


  [...switch between] perception and imagination states, or [carry imagination and perception] out simultaneously


Basically, perception and imagination are two separate processes sharing large parts of their pathways, but not being identical.


  When an area sends information to another one, how does it signal whether this was perceived or imagined information?


This distinction is quite clear and pronounced, as perception is bottom-up (retinae to extristriate areas), whereas imagery is top-down (extrastriate areas to striate areas in the cortex). 


  Is there less of a distinction between the two than I'm thinking?


Indeed they are pretty similar as discussed and referenced above.


Fig. 1. Visual system. source: Shumpei Ogawa

References
- Ganis et al., Cognitive Brain Res (2004); 20(2): 226-41
- Ishai et al., Neuron (2000); 28: 979–90
- Kupers et al., Front Psychol (2011); 2: 19