Picture a vending machine. You press a button, say B4, and the machine drops a snack, say pretzels. You choose the button; the snack is decided by the machine's wiring. The button is the independent variable and the snack is the dependent one. In y=3x+2, x plays the button: choose x=0, 1 or 4 and the rule returns y=2, 5 or 14. You never pick y directly; you get it by picking x.
In real situations, ask what someone controls or what simply passes. Time is almost always independent: you decide when to look, and the plant's height, the bank balance or the temperature is whatever it is at that moment. In an experiment the independent variable is the one the scientist sets, such as the amount of fertilizer, and the dependent variable is the one measured, such as plant height after three weeks.
The roles come from the question, not from the quantities themselves. With F=1.8C+32, a traveller converting a Celsius forecast treats C as independent. Someone with a Fahrenheit oven dial who needs Celsius uses C=1.8F−32, and now F is the independent one. A fixed number like the 1.8 is neither: it never changes, so it is not an input you choose or an output you get.
Think of it like this. Ordering in a café shows the two roles: you choose the drink size, and the price on the receipt follows from the menu. You cannot pick the price and have the size adjust, unless you turn the question around to "what size does $4 buy?", which swaps the roles.
Core idea. The independent variable is chosen freely; the dependent variable is whatever the function then returns.