Computation of seismic-wave traveltimes is used in seismic imaging procedures such as Kirchhoff migration. For realistic applications, one has to precompute large traveltime tables (for all sources, receivers, and imaging points). This implies massive computations as well as storage of large files with these traveltime tables. One of the popular traveltime computation methods is a numerical solution of the eikonal equation. In this paper, I addressed the idea of using artificial neural networks for optimizing traveltime computations and using traveltimes in Kirchhoff migration. First, I used supervised learning for approximating and compressing the traveltime tables by artificial neural networks. Second, I used unsupervised learning for solving the eikonal equation. I used fully-connected neural networks for solving both problems. For the first problem, I used traveltimes precomputed on a coarse for supervised training of a neural network. Synthetic tests show that this neural-network approximation provides great compression of the traveltime tables (102-105 times) with reasonable accuracy of predicting traveltimes on a fine imaging grid. Overall, the use of artificial neural networks results in a speed-up of the Kirchhoff migration operator in two applications: microseismic event localization (by three times) and reflection-seismic migration (by four times). The second problem was to use artificial neural networks for solving the eikonal equation. The main result was a special design of a loss function that ensures solution of the eikonal equation and allows for neural-network unsupervised training. In the synthetic test, the neural network was successfully used for solving the eikonal equation (forward problem) with slightly better accuracy compared to the first-order Fast Sweeping Method. I also demonstrated that neural networks could also solve the inverse problem - back propagate traveltimes from the observation surface into the subsurface. Such inversion was illustrated by successfully solving the problem of microseismic event localization.