For an invention to be patentable, it needs to be novel (that is, completely new). A public disclosure of your invention, by you or someone else, will strip it of novelty. It is therefore critical that there is no public disclosure of your invention prior to the filing of a patent application.
But what constitutes a public disclosure? Most patent jurisdictions (including the UK) require absolute novelty. This means that a disclosure of your invention (at any time before the filing of a patent application) which is made available to the public, by written or oral description, by use, or in any other way will prevent you from being able to get a patent application.
A disclosure of your invention will be considered to be prejudicial to its novelty if it is an enabling disclosure. This is a disclosure which would enable a person with the requisite knowledge and expertise to replicate the invention. What is material is the nature of the disclosure; it is irrelevant whether the actual recipient of the disclosure would themselves be able to replicate the invention.
Under absolute novelty, a disclosure anywhere in the world is relevant. It is notable that it is irrelevant whether the disclosure has actually been seen or accessed by anyone, as long as it could have been accessed. For example, a disclosure in a book hidden in the corner of a remote library would be prejudicial even if no one had ever opened that book.
A disclosure to any person who is free to use it will destroy the novelty of your invention. This includes informal disclosure of your invention to friends (for example, simply discussing your invention). It does not include a disclosure to a party who has signed a non-disclosure (or confidentiality) agreement.