Village/Smithy strategy
"If you have 5 or more Smithies" means if you have 5 total Smithies in your deck (your deck being all cards you have; between your draw pile, discard pile, hand, in play, etc).

"If there are 3 or less Provinces left" means that the rule will only be followed when the Province pile is down to 0, 1, 2, or 3 Provinces. If there are still 4 or more Provinces in the Province pile, Duchies will not be bought.

Max 2 is like the first question; it means that once 2 Cellars have been bought total, no more will be bought.

The strategy for which actions to play is in this case programmed into the simulator. For the most part, it is trivial, though there are sometimes tricky decisions to make. For example, if you have some actions that give +1 action when played, and others that don't, you play the ones that give +1 action first. (If you play Smithy first, you can't play any other actions). If you have Market and Village, the order is irrelevant.

Occasionally, you would have to decide between playing a Smithy, a Militia, and a Remodel. Which is the best play would depend on a lot of factors including how late in the game it is, what else is in your hand, what is left in your draw pile, etc.

The simulator has a list of cards programmed that are considered "junk" cards that will be discarded when Cellar is played. I believe these include any victory cards, as well as Curses and Coppers. This is because any cards you draw in place of those will, on average, be better to have.

Welcome to Dominion!