We study the Maximum Cardinality Matching (MCM) and the Maximum Weight Matching (MWM) problems, on trees and on some special classes of graphs, in the online preemptive and the incremental graph models. In the Online Preemptive model, the edges of a graph are revealed one by one and the algorithm is required to always maintain a valid matching. On seeing an edge, the algorithm has to either accept or reject the edge. If accepted, then the adjacent edges are discarded, and all rejections are permanent. In this model, the complexity of the problems is settled for deterministic algorithms (McGregor, in: Proceedings of the 8th international workshop on approximation, randomization and combinatorial optimization problems, and proceedings of the 9th international conference on randomization and computation: algorithms and techniques, APPROX’05/RANDOM’05, Springer, Berlin, pp. 170–181, 2005; Varadaraja, in: Automata, languages and programming: 38th international colloquium, ICALP 2011, Zurich, Switzerland, proceedings, part I, pp. 379–390, 2011. https://doi.org/10.1007/978-3-642-22006-7_32 ). Epstein et al. (in: 30th international symposium on theoretical aspects of computer science, STACS 2013, Kiel, Germany, pp. 389–399, 2013. https://doi.org/10.4230/LIPIcs.STACS.2013.389 ) gave a 5.356-competitive randomized algorithm for MWM, and also proved a lower bound on the competitive ratio of $$(1+\ln 2) \approx 1.693$$ for MCM. The same lower bound applies for MWM. In the Incremental Graph model, at each step an edge is added to the graph, and the algorithm is supposed to quickly update its current matching. Gupta (in: 34th international conference on foundation of software technology and theoretical computer science, FSTTCS 2014, 15–17 Dec 2014, New Delhi, India, pp. 227–239, 2014. https://doi.org/10.4230/LIPIcs.FSTTCS.2014.227 ) proved that for any $$\epsilon \le 1/2$$ , there exists an algorithm that maintains a $$(1+\epsilon )$$ -approximate MCM for an incremental bipartite graph in an amortized update time of $$O\left( \frac{\log ^2 n}{\epsilon ^4}\right) $$ . No $$(2-\epsilon )$$ -approximation algorithm with a worst case update time of O(1) is known in this model, even for special classes of graphs. In this paper we show that some of the results can be improved for trees, and for some special classes of graphs. In the online preemptive model, we present a 64 / 33-competitive randomized algorithm (which uses only two bits of randomness) for MCM on trees. Inspired by the above mentioned algorithm for MCM, we present the main result of the paper, a randomized algorithm for MCM with a worst case update time of O(1), in the incremental graph model, which is 3 / 2-approximate (in expectation) on trees, and 1.8-approximate (in expectation) on general graphs with maximum degree 3. Note that this algorithm works only against an oblivious adversary. We derandomize this algorithm, and give a $$(3/2+\epsilon )$$ -approximate deterministic algorithm for MCM on trees, with an amortized update time of $$O(1/\epsilon )$$ . We also present a minor result for MWM in the online preemptive model, a 3-competitive randomized algorithm (that uses only O(1) bits of randomness) on growing trees (where the input revealed upto any stage is always a tree, i.e. a new edge never connects two disconnected trees).