Fore and aft are the old sailor's terms for the front and back of anything, usually a ship. As near as I can tell they both come from the Saxon terms fore (front) and abaft (back) which was then shortened to aft. After came along fairly quickly but fore remained the terminology in use for some time and fore and aft are used to this day aboard ship. If you hear some guy call the bow front or the taffrail back, he's a lubber. Period.
Fore was used not just in relation to the ship but in reference to anything that went before. "Boarders to the fore!" was an order indicating the obvious - board the enemy! Fore could be added to almost any word to indicate location - forelock, fore-chains, fore-cockpit and so on. The common seafaring term forecastle - foc'sul - came into use because Medieval ships actually had fore and aft "castles" built on them to protect archers. "Aftcastle" (aft'sul?) never quite caught on and became the giggle inducing poop instead. Anything ahead of fore is before.
Aft is just as handy. Right aft is in a direct line with the keel from the stern. A mast rakes aft when it points to the stern and so on. Aft in particular became part of common terms - afternoon, aftermost, afterguard, afterlife, etc. Anything behind aft is after.
Try using the original terms and you're talking like a pirate without thinking about it. "Get your homework done fore you run out and play." "Let's have some cake aft supper." Try it! The fun never ends!
Happy Saturday, Brethren! Mind your fore and aft sails and they'll get you to the prize all the sooner.