In this thesis, a Two Windows MAC Algorithm (TWMA) is proposed and extensive simulation studies compare the proposed medium access algorithm and IEEE 802.11 standard. TWMA is introduced to solve the fairness problem in medium access and improve the utilization of the channel i.e. throughput, traffic delay, and fairness of medium access algorithm mainly in wireless ad hoc networks using Carrier-Sense Multiple Access with Collision Avoidance (CSMA/CA). The media access control (MAC) protocol plays a critical role in providing fairness, efficiency, and robustness in wireless networks. IEEE 802.11 MAC using exponential random backoff algorithm can not solve such fairness problem, i.e. stations cannot gain fair access to the shared wireless medium, due to non-homogeneous traffic load distribution, location dependent contention for medium access, and lack of central administration in ad hoc networks. The proposed MAC algorithm uses a variable Channel Status Indicator (CSI) to represent adjacent traffic status and two windows contention algorithm in order to achieve better throughput, latency, and a degree of fairness. Simulation results show the performance characteristics and functionalities of the algorithm that includes throughput, latency, buffer overflow, and etc. The simulation results reveal that the proposed TWMA achieve higher throughput and lower latency than that of the IEEE 802.11 standards MAC algorithm.