The first step to having a safe kayak trip is to pack items that will help keep you safe, namely a life vest and a first aid kit. In addition, prepare yourself by making sure you can both swim well and recognize and self-treat medical issues (such as hypothermia).
The best way to learn paddling is by doing it, but as a basic rule, don’t hit whitewater or waves sideways; avoid it altogether or head directly into it. Practice paddling in gentle water, though, and use common sense: empty water that enters the kayak and only enter or exit your kayak in shallow water. Never mix alcohol and kayaking; alcohol impairs your senses and you will have even more difficulty than usual escaping from a flipped kayak. Do some research (including browsing the other kayaking articles on this website) regarding how to escape from a flipped kayak, and before you depart, make sure that you could safely escape from a flip.
If you are taking an overnight trip and camp on the shore, use normal camping safety practices. Don’t leave out food (it will attract animals) and don’t light your fire near leaves, sticks, or brush, which will all ignite. Fnally, both in kayaking and camping, watch out for snakes, which often rest on low-hanging tree branches over the water.