It makes more sense when you are familiar with how SmartApps work (a piston is implemented as a SmartApp). Basically they will start up (that happens when you click on ‘save’ in the edit screen in webCoRE), subscribe to a number of device events (i.e. register event handlers for them), and perhaps schedule a wake up. Then they will exit.
You need to know about triggers and conditions. A trigger is a conditional statement based on an instantaneous event like ‘bedroom plug switch changes to on’ or ‘bathroom sensor temperature rises above 30C’. If you have any triggers like that, webCoRE will (by default) understand that it needs to run the piston when those things might have happened, so it subscribes to changes in the bedroom plug switch and the bathroom sensor temperature and runs the piston when those events happen. It doesn’t care which way the switch has changed or what the new temperature is, it just runs the piston and the piston logic decides what happens.
A condition is a conditional statement based on the current state of things. So things like ‘bedroom plug switch is on’ or ‘temperature is greater than 30C’. If there are some triggers elsewhere in the piston, webCoRE just evaluates these conditionals when the piston is executed. You might think of them as restrictions, but webCoRE uses that term elsewhere.
Timing works similarly. The conditional ‘time is 11:00pm’ is an instantaneous event so that is a trigger, whereas ‘time is after 11:00pm’ is a condition. In the former case the piston will be scheduled to run at 11pm, in the latter case it is just a conditional applied when the piston is executed for some other reason.
Now what happens if there isn’t a trigger anywhere in the piston? In that case webCoRE will do something sensible. If will go through all the conditions and subscribe to all the device state changes, or create an appropriate schedule, that could affect the condition. So if you are interested in ‘bedroom plug switch is on’ it will run whenever the bedroom plug switch changes, and if you are interested in ‘time after 11pm’ it will schedule the piston to run at 11pm.
If you view your pistons on the webCoRE dashboard (NOT in edit mode) you will see a ‘lightning’ icon next to the line numbers. That indicates that there are subscriptions active for that line - so in effect those are the lines that are influencing when the piston will run.
It can get more complicated than that, but only if you choose to make it so.
There are webCoRE users who only write pistons that have a trigger somewhere, and also some who limit themselves to triggers based on the same device event (so ‘switch changes to off’ and ‘switch changes to on’ are the same subscription). I don’t think like that and happily use pistons without any triggers, allowing webCoRE to sort things out.