Juxtaglomerular apparatus
The juxtaglomerular apparatus is a microscopic structure in the kidney, which regulates the function of each nephron. The juxtaglomerular apparatus is named for its proximity to the glomerulus: it is found between the vascular pole of the renal corpuscle and the returning distal convoluted tubule of the same nephron. This location is critical to its function in regulating renal blood flow and glomerular filtration rate. The three microscopic components of the apparatus are the macula densa, extraglomerular mesangial cells, and juxtaglomerular cells.

# Juxtaglomerular cell
Juxtaglomerular cells (JG cells, also known as granular cells) are the site of renin secretion.
The JG cells are found in the afferent arterioles of the glomerulus and act as an intra-renal pressure sensor. Lowered pressure leads to decreased pressure on the JG cells, allowing them to swell.  This swelling increases intracellular levels of cAMP which stimulates PKA which causes the secretion of renin.  Renin then acts to increase systemic blood pressure (while maintaining GFR) via the renin-angiotensin system.

# Macula densa
The macula densa senses sodium chloride concentration in the distal tubule of the kidney and secretes a locally active (paracrine) vasopressor which acts on the adjacent afferent arteriole to decrease glomerular filtration rate (GFR), as part of the tubuloglomerular feedback loop. Specifically, excessive filtration at the glomerulus or inadequate sodium uptake in the proximal tubule / thick ascending loop of Henle brings fluid to the distal convoluted tubule that has an abnormally high concentration of sodium.  Na/K/2Cl cotransporters  move sodium into the cells of the macula densa.  The macula densa cells have an inadequate number of Na/K ATPases to excrete this added sodium, so the cell's osmolarity increases.  Water flows into the cell to bring the osmolarity back down, causing the cell to swell.  When the cell swells, a stretch-activated non-selective anion channel is opened on the basolateral surface.  ATP escapes through this channel and is subsequently converted to adenosine.  Adenosine causes constriction of the vascular smooth muscle cells of the afferent arteriole, reducing the amount of blood that reaches the nephron.

# Mesangial cells
Mesangial cells are structural cells in the glomerulus that under normal conditions serve as anchors for the glomerular capillaries. The mesangial cells within the glomerulus communicate with mesangial cells outside the glomerulus (extraglomerular mesangial cells), and it is the latter cells that form part of the juxtaglomerular apparatus. These cells form a syncytium and are connected with glomerular mesangial cells via gap junctions.
The function of the extraglomerular mesangial cells remains somewhat mysterious. They contain actin and myosin, allowing them to contract when stimulated by renal sympathetic nerves, which may provide a way for the sympathetic nervous system to modulate the actions of the juxtaglomerular apparatus. In addition, extraglomerular mesangial cells are strategically positioned between the macula densa and the afferent arteriole, and may mediate signalling between these two structures.