The phrase often implies someone intentionally causing trouble to ruin another's plans. The team was doing well until an envious colleague put a spoke in their wheel.
Pro Tip 2/3
Unexpected Obstacles
It can also mean unexpected obstacles that appear, not necessarily caused by someone. A sudden thunderstorm really put a spoke in the wheel of the outdoor event.
Pro Tip 3/3
Figurative Use
Understand that the phrase is figurative and does not involve actual wheels or spokes. When she contradicted me in the meeting, it felt like she put a spoke in my wheel.