Have a look at TPE (
http://photoephemeris.com/ ). It gives the times and directions of sunrise and set (and also moonrise and set) for anywhere on the Earth on any day. It is very useful for getting a good location for a rise or set shot.
You will sometimes get a good shot by just being in the right place at the right time, but a lot of the time it needs some planning.
Check out the weather forecast. You cannot be sure there will be a good sunrise or set, but the forecast can help. The forecast is often better at telling you when not to bother.
If you have fund a likely place and the forecast looks good, allow yourself plenty of time to get there. This sounds obvious but I know how easy it is to be in the right place just after the right time. Watching a sunrise or set really shows how fast the Earth rotates, the scene changes very quickly and for each of the many changing patterns of light in each rise or set you get only one chance.
The 'problem' with these shots is the sky is lightly to be much brighter than the land and the camera sensor cannot cope with such a large range. Graduated filters, as mentioned above, will help balance out the difference; there is a good desciption of grad filters here -
http://www.cambridgeincolour.com/tutorials/graduated-neutral-density-filters.htm
Another way is to take several exposures at different settings from exactly the same position and combine them with software. If you google for 'bracketing exposures' you'll find a lot of info.
Looking directly at the sun is not a good idea but often the sun is partly obscured by cloud so it is not a great problem and a completely unobscured sun doesn't make for the best shots anyway. If you are using the optical viewfinder you won't fry the sensor because the light coming out of the viewfinder never hits the sensor. My understanding is you are more likely to fry the sensor if you use live view. The live view image is generated by projecting the image created on the sensor onto the LCD screen.
Dave