For star trails, remember to do many short (30 second) exposures rather than a single long exposure (very long exposures lead to massive noise in digital cameras). Then join them using an image stacker.
You’ll probably need an intervalometer (get a cheap one off ebay).
Also take a few frames at the start and end with the lens cap on.
There are many image stackers available (see here for one useful link), some can use exposures taken with the lens cap on (which contain only noise) to help remove noise from the other pictures.
Edit: for static pictures shutter speed of about 30 seconds will prevent much star movement. Anything over a minute will become streaky.