Both buildings are easy walking distance to each other. In fact, most of central Hildesheim is easy to navigate by foot. The church and the cathedral are open to visitors during normal hours and when there are no religious services taking place.
Although the architecture of both sites is interesting make sure you also take time to appreciate the artworks. The ceiling painting in the church and the bronze doors and column in the cathedral are the highlights but there’s much more to see as well.
There are a number of other sites to visit in Hildesheim while you’re there. The historic market place is worth checking out and you might also consider the Roemer-und-Pelizaeus Museum which has a collection of ancient Egyptian and Peruvian exhibits.