In centralized matching markets, such as kidney exchange schemes and car-pooling platforms, new participants constantly enter the market and remain available for potential matches during a limited period of time. To reach an efficient allocation, the timing'' of the matching decisions is a critical aspect of the platform's operations. There is a fundamental tradeoff between increasing market thickness and mitigating the risk that participants abandon the market. Nonetheless, the dynamic properties of matching markets have been mostly overlooked in the classic algorithmic literature. In this paper, we introduce a general dynamic matching model over edge-weighted graphs, where the agents' arrivals and abandonments are stochastic and heterogeneous. While the resulting Markov decision process is computationally intractable, we design new simple matching algorithms that admit strong worst-case performance guarantees. We devise a 3-approximation algorithm for the cost-minimization problem on graphs satisfying a metric-like property. In contrast, we show that the performance of widely used batching algorithms can be arbitrarily bad. We further devise a (e-1)/(2e)-approximation algorithm for the reward-maximization problem on arbitrary bipartite graphs. Our approach involves the development of a host of techniques, including linear programming benchmarks, value function approximations, and proxies for continuous-time Markov chains, that could be of broader interest. In extensive experiments, we simulate the matching operations of a car-pooling platform using real-world taxi demand data. The newly developed algorithms have the potential to significantly improve cost efficiency against widely used batching algorithms.