Use 'd better (= had better) + the base verb for strong advice or a warning: do this, or something bad will happen. It's stronger than "should". In careful speech and writing, keep the 'd (had); you'll also hear a casual "you better", but you'd better is the safe form to use.
'd better + base verb: strong advice
You'd better hurry, or you'll miss the train.
We'd better call ahead, the place gets busy.
I'd better leave now.
Not "You better hurry." — say "You'd better hurry.". Keep the 'd (had): you'd better, not just "you better".
Try it: The roads are icy. You ___ slow down. ('d better / better / 'd better to) Answer: 'd better — Strong advice with a warning takes 'd better + the base verb: you'd better slow down. "Better" alone drops the needed 'd (had), and "'d better to" adds a to that doesn't belong (it's 'd better slow, not to slow).
'd better not + base verb
For the negative, put not straight after: 'd better not + the base verb. (Not "don't had better".)
You'd better not be late again.
We'd better not tell her yet.
I'd better not forget my keys.
Try it: It's a quiet library. We ___ talk loudly. ('d better not / don't better / 'd not better) Answer: 'd better not — The not goes straight after better: we'd better not talk. "Don't better" and "'d not better" put the not in the wrong place, the order is 'd better not.
'd rather + base verb: what you prefer
Use 'd rather (= would rather) + the base verb to say what you prefer. No to after it.
I'd rather stay home tonight.
She'd rather walk than take the bus.
Would you rather have tea or coffee?
Not "I'd rather to stay home." — say "I'd rather stay home.". No to after 'd rather: I'd rather stay, not "I'd rather to stay".
Try it: It's pouring outside. I ___ a film at home tonight. ('d rather watch / 'd rather to watch / 'd rather watching) Answer: 'd rather watch — 'd rather takes the base verb with no to: I'd rather watch. "'d rather to watch" adds a to that doesn't belong, and "'d rather watching" uses the -ing form instead of the base verb.
'd rather not + base verb
For the negative, put not straight after: 'd rather not + the base verb. Still no to. (Not "'d not rather" and not "don't rather".)
I'd rather not talk about it.
We'd rather not wait any longer.
She'd rather not go out tonight.
Not "I'd rather not to talk about it." — say "I'd rather not talk about it.". Put not straight after rather, then the base verb with no to: I'd rather not talk.
Try it: She offered me a lift home, but I ___ trouble her. ('d rather not / 'd not rather / don't rather) Answer: 'd rather not — The not goes straight after rather: I'd rather not trouble her. "'d not rather" and "don't rather" put the not in the wrong place, the order is 'd rather not.
Try it: One sentence warns you to act; the other says what you prefer. Which is right? (You'd better see a doctor, but I'd rather wait a day. / You'd rather see a doctor, but I'd better wait a day. / You'd better see a doctor, but I'd better wait a day.) Answer: You'd better see a doctor, but I'd rather wait a day. — A warning to act (or something bad happens) = 'd better: you'd better see a doctor. A personal preference = 'd rather: I'd rather wait. Use 'd better for strong advice, 'd rather for what you prefer.