The German verbs raten and beraten can both mean "to advise," or "to give advice," but to correctly choose the right word, you need to learn the different ways they are used. Let's take a look at some different ways that raten and beraten are used in the sense of advising, so we can better understand which verb is appropriate to specific situations. Note that raten can also mean "to guess," and beraten can also mean "to discuss," but these are not definitions we're concerned with here.
The verb raten, in its meaning "to advise" or "to recommend," generally has a direct object stating what that advice is:
Und ich kann unseren britischen Freunden nur raten, sich hier auch nichts vorzumachen.
And I can only advise our British friends not to have any misconceptions.
Caption 15, Brexit-Votum: Merkel warnt vor Spaltung EuropasPlay Caption
Alle meine Freunde raten Dich mir aus dem Kopf zu schlagen.
All of my friends advise me To put you out of my mind.
Captions 23-24, SDP feat. Adel Tawil. Ich will nur, dass du weißtPlay Caption
Experten raten im Gegensatz zum Gesetzgeber zu mindestens vier Millimeter.
In contrast to legislators, experts advise at least four millimeters.
Caption 25, Winterreifen: Wenn der erste Schnee nahtPlay Caption
Note that with the verb raten, if the person who is being given the advice is stated, it is always in the dative case. The advice itself thus stated as the direct object, and the person to whom it is directed is the indirect object.
The verb beraten, on the other hand, has the person being advised as the direct object in the accusative case, and generally the actual advice is not mentioned in the same sentence. Note too that beraten can often be alternately translated as "to receive advice" (to be advised by) or "to give advice" (to advise).
Ein Bankkaufmann muss Kunden beraten.
A banker has to advise clients.
Caption 10, Nicos Weg: Mein BerufPlay Caption
Alternately: A banker has to give advice to clients.
Der Apotheker oder die Apothekerinnen beraten die Kunden.
The pharmacist or the pharmacists advise the customers.
Caption 21, Eva erklärt: GesundheitPlay Caption
Alternately: The pharmacist or the pharmacists give advice to the customers.
Suchen Sie dann den nächsten Schalter Ihrer Fluggesellschaft auf und lassen sich vor Ort beraten.
Search then for the nearest ticket counter of your airline and let them advise you on the spot.
Captions 7-8, Flugreisen Was mache ich, wenn...Play Caption
Alternately: ...let them give you advice on the spot. Note that the form in this case is sich beraten lassen.
To conclude, you should use raten if you want to specifically advise something, but you should use sich beraten lassen if you are suggesting somebody gets advice, and jemanden beraten if you are suggesting somebody gives advice:
Ich rate dir den Arzt zu besuchen.
I advise you to visit the doctor.
Ich rate dir dich vom Arzt beraten zu lassen.
I advise you to get advice from your doctor.
Der Arzt hat mich beraten.
The doctor advised me.
Or: The doctor gave me advice.
We could even translate the next-to-last sentence as "I advise you to be advised by your doctor," but it's a bit clumsy, isn't it?
Go to German Yabla and find other examples of raten and beraten to see them used in a real world context. You can also compare raten and beraten to the similarly-used verb empfehlen.