For a polynomial ring R = k[x1, ..., xn], we present a method to compute the characteristic cycle of the localization Rf for any nonzero polynomial f R that avoids a direct computation of Rf as a D-module. Based on this approach, we develop an algorithm for computing the characteristic cycle of the local cohomology modules Hr I (R) for any ideal I R using the Cech complex. The algorithm, in particular, is useful for answering questions regarding vanishing of local cohomology modules and computing Lyubeznik numbers. These applications are illustrated by examples of computations using our implementation of the algorithm in Macaulay 2.